The Struts dispatcher cannot be found在struts2中出现的问题
2016-11-30 16:28
543 查看
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)
解决办法:
1.引入
<%@ taglib prefix="s" uri="/struts-tags" %>
2.在web.xml中未将拦截的*.action改成/*
<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>/*</url-pattern>
</filter-mapping>
- [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)
解决办法:
1.引入
<%@ taglib prefix="s" uri="/struts-tags" %>
2.在web.xml中未将拦截的*.action改成/*
<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>/*</url-pattern>
</filter-mapping>
相关文章推荐
- 解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found
- the Struts dispatcher cannot be found. 在struts2中出现的问题
- The Struts dispatcher cannot be found在struts2中出现的问题
- The Struts dispatcher cannot be found在struts2中出现的问题
- struts2标签 The Struts dispatcher cannot be found
- struts2错误:The Struts dispatcher cannot be found.
- The Struts dispatcher cannot be found. 在页面使用struts2的标签时报的异常
- 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.
- 初学struts,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.