struts2 sitemesh不起作用(问题已解决)
来源:互联网 发布:安全风险评估矩阵图 编辑:程序博客网 时间:2024/06/08 07:24
今天第一次搭建struts2框架,遇到的问题还真多,按照struts的方法在系统添加了对sitemesh的支持
登录页面sitemesh正常工作,我本以为OK了,没想到登录成功后,转到index.jsp时,sitemesh竟然不工作了,我仔细的检查了几遍,问题依旧
无意间在网上看到说web.xml的struts2, sitemesh配置顺序应该是这样的
- ActionCleanUp
- sitemesh
- struts2
正常的web.xml
<!-- config ActionContextCleanUp filter -->
<filter>
<filter-name>struts-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- config sitemesh -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- config struts2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- config sitemesh tld -->
<jsp-config>
<taglib>
<taglib-uri>sitemesh-page</taglib-uri>
<taglib-location>
/WEB-INF/tld/sitemesh-page.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>sitemesh-decorator</taglib-uri>
<taglib-location>
/WEB-INF/tld/sitemesh-decorator.tld
</taglib-location>
</taglib>
</jsp-config>
<!-- config welcome page -->
<welcome-file-list>
<welcome-file>/form/login.jsp</welcome-file>
</welcome-file-list>
我原来的顺序:
- struts2
- sitemesh
看来struts2+spring2.5+hibernate3.2(增加对sitemesh, ajax的支持)的路还长着呢
- struts2 sitemesh不起作用(问题已解决)
- 求助STRUTS2.0问题(问题已解决)
- sitemesh的问题及解决
- struts2+sitemesh
- @Struts2问题,已解决No resul…
- 解决split不起作用的问题
- 解决set_unexpected不起作用的问题
- 花了一个通宵总算解决了sitemesh对于struts2转发地址不进行装饰的问题
- sudo不起作用,unable to resolve host 已解决
- 通过引入SiteMesh的JSP标签库,解决Freemarker与SiteMesh整合时,自定义SiteMesh标签的问题
- Cannot load excludes configuration file "/WEB-INF/decorators.xml" as specified in "sitemesh.xml" or "sitemesh-default.xml"(已解决)
- struts2+SiteMesh学习笔记
- struts2 整合 SiteMesh
- struts2集成sitemesh
- Struts2整合SiteMesh
- sitemesh struts2 整合
- urlrewritefilter sitemesh struts2
- Struts2 集成 sitemesh配置
- 关于指针,对象周期,构造函数等的一些测试
- 关于Find对话框的使用
- C语言中位移位运算符
- 好中层的八个标准:如何成为一名优秀的管理者
- Delphi编写无DLL版穿墙的下载者
- struts2 sitemesh不起作用(问题已解决)
- Delphi中完成端口(IOCP)的简单分析
- STL之关联容器--Fwd
- 浅谈Java存储过程调用(转)
- 电视剧《奋斗》和《蜗居》的区别(完整版)
- Android 彻底全屏的方法
- 单元测试(Spring Dao Junit)
- 邮件退信原因分析对照表
- Understanding ASP.NET View State