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.解决方法
此错误原因在于直接访问的jsp页面上包含了struts标签
直接访问带有struts标签的jsp页面,必须通过action跳转,也就是要通过web.xml配置的过滤器访问
如果要直接访问带有struts标签的jsp页面
在web.xml中配置
<action name="*">
<result>/{1}.jsp</result>
<result>/{1}.jsp</result>
</action>
访问时将.jsp换成.do即可
本文详细解释了在使用Struts框架时,遇到的TheStrutsdispatcher无法找到的问题及其解决办法。通常,此错误源于直接访问包含Struts标签的JSP页面,而未经过配置的过滤器。文章提供了如何正确配置web.xml文件的指导,确保请求能通过Struts的servlet过滤器。
572

被折叠的 条评论
为什么被折叠?



