web.xml struts2(version 2.3.4)的配置

web.xml struts2(version 2.3.4)的配置

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Struts2Example14</display-name>
  <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter. StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<listener>
    <listener-class>org.springframework.web.context. ContextLoaderListener</listener-class>
</listener>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

org.apache.struts2.dispatcher.FilterDispatcher
org.apache.struts2.dispatcher.ActionContextCleanUp

已过期,不要使用

如果是2.1.3之前的版本,用 org.apache.struts2.dispatcher.FilterDispatcher,以后的版本则配置org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
来源:http://hi.baidu.com/903714484/item/0db2d4f8f05ad60ae2e3bd53

你可能感兴趣的:(struts2)