index.jsp页面有如下代码:<tiles:insertTemplate template="/layout/basiclayout.jsp" flush="true">
<tiles:putAttribute name="header" value="/public/index_header.jsp"/>
<tiles:putAttribute name="left" value="/public/login_left.jsp"/>
<tiles:putAttribute name="body" value="/login.action"/>
<tiles:putAttribute name="footer" value="/public/index_footer.jsp"/>
</tiles:insertTemplate> 我想在定义的tiles里面的value属性上赋action的值 就是这个put-attribute上的部分显示的是action之后的结果 但是每次显示的结果都是有错误的 其他的部分正常 只有action的地方显示
The requested resource (/R/login.action) is not available
我的项目名称为为R 但是我要是直接访问login.action就正常
不知道为什么 求解!! 万分感谢
<tiles:putAttribute name="header" value="/public/index_header.jsp"/>
<tiles:putAttribute name="left" value="/public/login_left.jsp"/>
<tiles:putAttribute name="body" value="/login.action"/>
<tiles:putAttribute name="footer" value="/public/index_footer.jsp"/>
</tiles:insertTemplate> 我想在定义的tiles里面的value属性上赋action的值 就是这个put-attribute上的部分显示的是action之后的结果 但是每次显示的结果都是有错误的 其他的部分正常 只有action的地方显示
The requested resource (/R/login.action) is not available
我的项目名称为为R 但是我要是直接访问login.action就正常
不知道为什么 求解!! 万分感谢
解决方案 »
- ie9的div+css自适应高度问题!
- 新手求助,关键词jsp、java、tomcat
- 大家看看这个为啥The menu repository could not be found.
- 请问JSP怎样实现菜单关联啊?
- 有谁有 JSP文件管理论文给发一个好吗 急用谢谢
- 大家好!请问一个高难度问题。。。。。
- Error creating bean with name 'defaultHandlerMapping'
- 初用myeclipse几个问题请教大家!
- excel在jsp页面的显示
- 关于hibernate内存泄露问题是什么原因造成的 怎么解决啊。
- js 验证邮件、手机问题
- MyBatis:XML fragments parsed from previous mappers does not contain value for
tiles-core-2.0-20070207.130156-4.jar,
tiles-api-2.0-20070207.130156-4.jar,
struts2-tiles-plugin-2.0.6.jar,
2.以下内容添加到web.xml <context-param>
<param-name>org.apache.tiles.CONTAINER_FACTORY</param-name>
<param-value>
org.apache.struts2.tiles.StrutsTilesContainerFactory
</param-value>
</context-param>
<context-param>
<param-name> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener>
http://blog.csdn.net/haoxing272/archive/2007/07/22/1701741.aspx3.struts.xml <struts>
<package name="default" extends="tiles-default">
<action name="go" class="com.action.MyAction">
<!--result name="success">/next.jsp</result-->
<result name="success" type="tiles">myapp.homepage</result>
</action>
</package>
</struts>
转自http://blog.csdn.net/haoxing272/archive/2007/07/22/1701741.aspx
直接访问login.action正常的问题的原因是 tiles把我的action当成文件处理了 所以访问不到把filter的顾虑范围加大之后就能对tiles里面的action进行过滤了!没在自己电脑上 没找到修改的代码回去之后补充啊
<filter-mapping>
<filter-name>过滤器名称</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>