type Exception report message The Struts dispatcher cannot be found. This is usually caused by using

1.解决方法
将web.xml 的过滤器,从 .action 修改为: /

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
  <display-name>struts</display-name>
  <filter>
   <filter-name>struts</filter-name>
   <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
   <filter-name>struts</filter-name>
   <url-pattern>*.action</url-pattern>
  </filter-mapping>
</web-app>

猜你喜欢

转载自blog.csdn.net/qq_43164918/article/details/83053854