The Struts dispatcher cannot be found. This is usually caused by using Struts ta

简介:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

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:52) org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49) org.apache.jsp.index_jsp._jspx_meth_s_005ftextfield_005f0(index_jsp.java:122) org.apache.jsp.index_jsp._jspService(index_jsp.java:93) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
(1)JSP页面中没有加入类似下面内容:
<%@ taglib prefix="s" uri="/struts-tags"%>
(2)拦截器不是/*
  <filter>
  	<filter-name>struts2</filter-name>
  	<filter-class>
  		 org.apache.struts2.dispatcher.FilterDispatcher 
  	</filter-class>
  </filter>
 

</filter-mapping>


本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/p/6365661.html,如需转载请自行联系原作者

相关文章
|
2月前
|
Java Spring
【亲测有效完结bug】org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exce
【亲测有效完结bug】org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exce
280 0
报错ERROR 3576 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for
报错类似题目这样的是因为你相应的类没有序列化,只需要在相关类后继承序列化接口即可。
1236 0
报错ERROR 3576 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for
|
5月前
|
Java
Servlet.service() for servlet [dispatcherServlet] in contextIllegal base64 character 3a,好建议,建一个bug方
Servlet.service() for servlet [dispatcherServlet] in contextIllegal base64 character 3a,好建议,建一个bug方
Servlet.service() for servlet [dispatcherServlet] in contextIllegal base64 character 3a,好建议,建一个bug方
|
7月前
|
应用服务中间件 Linux
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nes
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nes
163 0
|
存储 缓存 Java
【Java异常】org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet requ
【Java异常】org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet requ
545 0
|
Java Spring 前端开发
精通SpringBoot——第一篇:DispatcherServlet和Multipart配置
SoringBoot 系列教程,DispatcherServlet和Multipart配置,深入理解SpringMVC 和SpringBoot的原理
8796 0
Could not resolve view with name 'xxx' in servlet with name dispatcherServlet
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/80336983 ...
7624 0