严重: Servlet.service() for servlet jsp threw exception The Struts dispatcher cannot be found.
2012-11-14 16:56
543 查看
严重: Servlet.service() for servlet jsp threw exception
The Struts dispatcher cannot be found.
严重: Servlet.service() for servlet jsp threw exception
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]
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:121)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:93)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:619)
2012-11-14 16:52:24 org.apache.catalina.startup.HostConfig checkResources
重点现象:加了标签后,出现此问题
其实最后只在原配置基础上加上.jsp过滤即可
解决办法如下:
增加
参考http://blog.sina.com.cn/s/blog_54410d940100tczd.html
The Struts dispatcher cannot be found.
严重: Servlet.service() for servlet jsp threw exception
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]
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:121)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:93)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:619)
2012-11-14 16:52:24 org.apache.catalina.startup.HostConfig checkResources
重点现象:加了标签后,出现此问题
其实最后只在原配置基础上加上.jsp过滤即可
<welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
解决办法如下:
增加
<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping>
参考http://blog.sina.com.cn/s/blog_54410d940100tczd.html
相关文章推荐
- 严重: Servlet.service() for servlet jsp threw exception The Struts dispatcher cannot be found.
- Servlet.service() for servlet jsp threw exception The Struts dispatcher cannot be found.
- 严重: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /WEB-INF/js
- 严重: Servlet.service() for servlet jsp threw exception
- 严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called
- SEVERE: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Proper
- 严重: Servlet.service() for servlet jsp threw exception
- JSP 不能用 不支持 STRUTS标签 报错 The Struts dispatcher cannot be found.
- 严重: Servlet.service() for servlet jsp threw exception
- JSP 不能用 不支持 STRUTS标签 报错 The Struts dispatcher cannot be found.
- 严重: Servlet.service() for servlet jsp threw exception--javax.servlet.ServletException:
- 严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException
- JSP The Struts dispatcher cannot be found异常的解决方法
- Struts 2 严重: Servlet.service() for servlet default threw exception java.lang.IllegalStateException
- 严重: Servlet.service() for servlet action threw exception org.apache.struts.chain.commands.InvalidPathException: No action config
- 严重: Servlet.service() for servlet dispatcherServlet threw exception java.lang.IllegalStateException:
- org.apache.jasper.JasperException: The Struts dispatcher cannot be found的解决方法
- org.apache.jasper.JasperException: The Struts dispatcher cannot be found的解决方法
- 严重: Servlet.service() for servlet jsp threw exception java.lang.NoSuchMethodError: com.opensymphony.
- 严重: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: According t