Reproduced from: http://blog.csdn.net/guoquanyou/article/details/6585847
The Struts dispatcher cannot be found. This are 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 Dispatche R 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)
The original use of labels, the reference method is the default configuration:
Web.xml: <filter> <filter-name>struts2</filter-name> <filter-class> Org.apache. Struts2.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <f Ilter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Reference in page: <%@ taglib prefix= "s" uri= "/struts-tags"%>
Due to the relationships of some special applications in the Web application used, the Web.xml configuration is changed to: <filter> <filter-name>struts2</filter-name> <FILTER-CLA ss> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> </filter> <taglib > <taglib-uri>struts-tags</taglib-uri> <taglib-location>/web-inf/struts2-core-2.0.11.jar </taglib-location> </taglib> <filter-mapping> <FILTER-NAME>STRUTS2</FILTER-NAME&G T <url-pattern>/*.action</url-pattern> </filter-mapping>
Let the Sturts filter accept only the suffix name Action request and configure the Struts tab to the Web.xml file.
But in use, direct access to index.jsp occurs with an exception: The struts dispatcher cannot be found. This is usually caused by using Struts tags without The associated filter. strut S tags are only usable when the request has passed through its servlet filter, which Initializes the struts dispatcher n eeded