struts2与struts1融合使用导致的问题,过滤器的路径如何设置?
各位好:我用的struts2和struts1融合在一起使用的。为了避免struts2对struts1造成影响,我在<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>*.action</url-pattern>
</filter-mapping>
用到了*.action的方式。但是这样存在一个问题,我提交页面全部用*.action方式到达跳转页面。但是当我点击IE上的后退的时候,就报错了,原因是我没有通过*.action的方式跳转到相应的页面。像我这种情况该怎么解决这个问题呢?
错误信息:
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag.
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
com.sitech.ismp.util.context.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:168)
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
用到了*.action的方式。但是这样存在一个问题,我提交页面全部用*.action方式到达跳转页面。但是当我点击IE上的后退的时候,就报错了,原因是我没有通过*.action的方式跳转到相应的页面。像我这种情况该怎么解决这个问题呢?
错误信息:
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag.
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
com.sitech.ismp.util.context.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:168)
...全文
相关推荐
struts2配置过滤器
struts2配置过滤器 示例代码
struts2 中路径无法跳转的问题
NULL 博文链接:https://lishouxinghome.iteye.com/blog/1364946
【Struts】设置字符编码过滤器,解决乱码问题收藏
NULL 博文链接:https://alexfc.iteye.com/blog/326497
Struts2.5.2的配置及问题解决
针对Struts2.5.2最新版本的配置进行了梳理,通过一步步的步骤和发生的问题点的解决,完成对Struts2.5.2的配置。
Birt 与 Struts2 整合
解决Birt 与 Struts2 整合时过滤器冲突问题。


Web 开发
