美文网首页
程序报错:The Struts dispatcher canno

程序报错:The Struts dispatcher canno

作者: 三招六式一把铁斧 | 来源:发表于2017-08-26 00:31 被阅读0次
  • 错误
    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
  • 解决方法
    (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>
   <filter-name>struts2</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>

相关文章

网友评论

      本文标题:程序报错:The Struts dispatcher canno

      本文链接:https://www.haomeiwen.com/subject/vttmdxtx.html