<?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>Javaweb</display-name>
  <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>
  <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>   
                <param-name>struts</param-name>   
                <param-value>
                classpath*:struts2.xml
                </param-value>   
</init-param>
</filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
        <dispatcher>FORWARD</dispatcher>
      <dispatcher>REQUEST</dispatcher>
  </filter-mapping>  
 
    <!-- spring的监听器,以便在启动时就自动加载spring的配置 -->
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
 
 
  <!-- 注:120则设置过期时间为120分钟 -->
     <session-config>
         <session-timeout>30</session-timeout>
     </session-config>
     
    <!-- spring的应用上下文 -->
 
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*/applicationContext.xml</param-value>
  </context-param>
</web-app>

posted on 2014-09-14 20:44  yuyezhulan  阅读(111)  评论(0编辑  收藏  举报