<?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" version="2.5">
  <display-name>JeePlus</display-name>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring/spring-context*.xml</param-value>
  </context-param>
  <!-- 加载Log4J 配置文件  -->  
  <!-- webAppRootKey：值缺省为webapp.root，当tomcat下部署多个应用时(每个都用到了log4j)，
		每个应用的web.xml中都要配置该参数，该参数与Log4j.xml文件中的${webapp.root}
		否则每个应用的webAppRootKey值都相同，就会引起冲突-->
  <context-param>
	<param-name>webAppRootKey</param-name>
	<param-value>webapp.root</param-value>
  </context-param>
  <!-- log4jConfigLocation：log4j配置文件存放路径 -->
  <context-param>
	<param-name>log4jConfigLocation</param-name>
	<param-value>classpath:properties/log4j.properties</param-value>
  </context-param>
  <listener>
	<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
  <listener>
    <listener-class>com.jeeplus.modules.sys.listener.WebContextListener</listener-class>
  </listener>
  <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
  </listener>
  <filter>
    <filter-name>encodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
      <param-name>forceEncoding</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>shiroFilter</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    <init-param>
      <param-name>targetFilterLifecycle</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>sitemeshFilter</filter-name>
    <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>sitemeshFilter</filter-name>
    <url-pattern>/a/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>sitemeshFilter</filter-name>
    <url-pattern>/f/*</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>springServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath*:/spring/spring-mvc*.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>springServlet</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>
  
  
  <!--代码生成器文件-->
   <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genCodeForm_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.genCodeForm_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genCodeForm_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/genCodeForm.jsp</url-pattern>
    </servlet-mapping>
     <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genTableForm_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.genTableForm_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genTableForm_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/genTableForm.jsp</url-pattern>
    </servlet-mapping>
     <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genTableList_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.genTableList_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genTableList_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/genTableList.jsp</url-pattern>
    </servlet-mapping>
     <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.importTableFromDB_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.importTableFromDB_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.importTableFromDB_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/importTableFromDB.jsp</url-pattern>
    </servlet-mapping>
    
    
    <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genMenuForm_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.genMenuForm_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genMenuForm_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/genMenuForm.jsp</url-pattern>
    </servlet-mapping>
    
    <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.fileTree_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.fileTree_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.fileTree_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/fileTree.jsp</url-pattern>
    </servlet-mapping>
    
    
    <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genCustomObjForm_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.genCustomObjForm_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genCustomObjForm_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/genCustomObjForm.jsp</url-pattern>
    </servlet-mapping>
    
    <servlet>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genCustomObjList_jsp</servlet-name>
        <servlet-class>org.apache.jsp.webpage.modules.gen.genCustomObjList_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>org.apache.jsp.webpage.modules.gen.genCustomObjList_jsp</servlet-name>
        <url-pattern>/webpage/modules/gen/genCustomObjList.jsp</url-pattern>
    </servlet-mapping>
  
   <!-- Modeler的Rest服务 -->
	<servlet>
		<servlet-name>ModelRestServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/act/rest/spring-mvc-modeler.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>ModelRestServlet</servlet-name>
		<url-pattern>/service/*</url-pattern>
	</servlet-mapping>

	<!-- Rest接口 -->
	<servlet>
		<servlet-name>RestServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/act/rest/spring-mvc-rest.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>RestServlet</servlet-name>
		<url-pattern>/rest/*</url-pattern>
	</servlet-mapping>
  
  <servlet>
    <servlet-name>DruidStatView</servlet-name>
    <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
    <init-param>
      <param-name>allow</param-name>
      <param-value>*</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>DruidStatView</servlet-name>
    <url-pattern>/druid/*</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>UserfilesDownloadServlet</servlet-name>
    <servlet-class>com.jeeplus.core.servlet.UserfilesDownloadServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>UserfilesDownloadServlet</servlet-name>
    <url-pattern>/userfiles/*</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>ValidateCodeServlet</servlet-name>
    <servlet-class>com.jeeplus.core.servlet.ValidateCodeServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ValidateCodeServlet</servlet-name>
    <url-pattern>/servlet/validateCodeServlet</url-pattern>
  </servlet-mapping>
  <error-page>
    <error-code>500</error-code>
    <location>/webpage/error/500.jsp</location>
  </error-page>
  <error-page>
    <error-code>404</error-code>
    <location>/webpage/error/404.jsp</location>
  </error-page>
</web-app>