struts2报错The Struts dispatcher cannot be found
来源:互联网 发布:北京淘宝代运营w863 编辑:程序博客网 时间:2024/06/18 07:17
转载自:今天学习struts2的验证,突然出现了下面这个异常郁闷死了
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. - [unknown location]org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
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. - [unknown location]org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)org.apache.jsp.validation.signup_jsp._jspx_meth_s_005ffielderror_005f0(signup_jsp.java:109)org.apache.jsp.validation.signup_jsp._jspService(signup_jsp.java:76)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.37 logs.
#原来是要将web.xml文件的filter配置改成下面这样:
<filter>
<filter-name>StrutsPrepareAndExecuteFilter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>StrutsPrepareAndExecuteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
#也有可能是没有导进标签库,导入标签:
<%@taglib uri="/struts-tags" prefix="s"%>
阅读全文
0 0
- struts2报错The Struts dispatcher cannot be found
- Struts2-The Struts dispatcher cannot be found
- struts2 异常信息:The Struts dispatcher cannot be found.
- struts2常见标签异常:The Struts dispatcher cannot be found.
- struts2.0 下The Struts dispatcher cannot be found 解决方法
- Struts2.0的异常 The Struts dispatcher cannot be found.
- struts2错误:The Struts dispatcher cannot be found.
- struts2错误:The Struts dispatcher cannot be found.
- struts2错误:The Struts dispatcher cannot be found.
- struts2错误:The Struts dispatcher cannot be found.
- struts2错误:The Struts dispatcher cannot be found.
- struts2标签 The Struts dispatcher cannot be found
- The Struts dispatcher cannot be found in struts2
- struts2错误:The Struts dispatcher cannot be found.
- Struts2配置错误之The Struts dispatcher cannot be found
- Struts2错误:The Struts dispatcher cannot be found.
- struts2 The Struts dispatcher cannot be found异常解决办法
- struts2错误:The Struts dispatcher cannot be found
- 大数据学习3——分布式文件系统HDFS
- 快速上手MQ之activeMQ(2)--spring整合
- 二维数组计算
- 振兴中华
- 小白笔记---------------------------------leetcode(101. Symmetric Tree )
- struts2报错The Struts dispatcher cannot be found
- 卷积神经网络Quiz1
- Storage Clean小节
- jquery easyui如何通过idField获取某行?
- 国内一线互联网技术团队帮你进阶,助你成长
- 第八篇
- Elasticsearch如何设置mapping
- .vue类型文档 和 webpack大藏玄机
- 锁