02-配置Struts2的核心Filter

来源:互联网 发布:游戏编程算法与技巧 编辑:程序博客网 时间:2024/06/05 02:44
<?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" 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>struts2-demo</display-name>  <!-- 定义Struts2的核心控制器:StrutsPrepareAndExcuteAndExcuteFilter -->  <filter>  <!-- 定义核心Filter的名字 -->  <filter-name>struts2</filter-name>  <!-- 定义核心Filter的实现类 -->  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>  </filter>  <!-- StrutsPrepareAndExecuteFilter用来处理所有的HTTP请求 -->  <filter-mapping>  <filter-name>struts2</filter-name>  <url-pattern>/*</url-pattern>  </filter-mapping>  <welcome-file-list>    <welcome-file>index.html</welcome-file>    <welcome-file>index.htm</welcome-file>    <welcome-file>index.jsp</welcome-file>    <welcome-file>default.html</welcome-file>    <welcome-file>default.htm</welcome-file>    <welcome-file>default.jsp</welcome-file>  </welcome-file-list></web-app>

0 0
原创粉丝点击