You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jeecg/src/main/webapp/WEB-INF/web.xml

190 lines
6.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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_3_0.xsd"
version="3.0">
<display-name>Jeecg 微云快速开发平台</display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>jeecg-4.0</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring-*.xml</param-value>
</context-param>
<filter>
<filter-name>openSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<!-- Rest风格url对应的controller支持延迟加载-->
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>
<filter>
<description>字符集过滤器</description>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<description>字符集编码</description>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>ecsideExport</filter-name>
<filter-class>org.jeecgframework.core.aop.GZipFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ecsideExport</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- CORS 解决跨域请求问题 (暂时注释掉提高平台性能,需要此功能,可以放开注释)
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.jeecgframework.core.filter.CORSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>-->
<listener>
<description>Introspector缓存清除监听器</description>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<description>spring监听器</description>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<description>request监听器</description>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<description>系统初始化监听器</description>
<listener-class>org.jeecgframework.web.system.listener.InitListener</listener-class>
</listener>
<listener>
<description>在线用户监听器</description>
<listener-class>org.jeecgframework.web.system.listener.OnlineListener</listener-class>
</listener>
<servlet>
<description>spring mvc servlet</description>
<servlet-name>springMvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<description>spring mvc 配置文件</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMvc</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>springMvc</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<!-- 集成cxf webservice接口暂时注释掉提高平台性能需要此功能可以放开注释
<servlet>
<description>Apache CXF Endpoint</description>
<display-name>cxf</display-name>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/cxf/*</url-pattern>
</servlet-mapping>
-->
<!-- druid -->
<filter>
<filter-name>druidWebStatFilter</filter-name>
<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
<init-param>
<param-name>exclusions</param-name>
<param-value>/css/*,/context/*,/plug-in/*,/plug-in-ui/*,*.js,*.css,*.gif ,*.jpg,*.png,*. ico,*/druid*,/attached/*,/upload/*,/webpage/*,/swagger/*,*.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>druidWebStatFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>druidStatView</servlet-name>
<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>druidStatView</servlet-name>
<url-pattern>/webpage/system/druid/*</url-pattern>
</servlet-mapping>
<!-- druid -->
<!-- 验证码 -->
<servlet>
<servlet-name>RandCodeImage</servlet-name>
<servlet-class>org.jeecgframework.web.system.servlet.RandCodeImageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RandCodeImage</servlet-name>
<url-pattern>/randCodeImage</url-pattern>
</servlet-mapping>
<!-- 本地磁盘图片访问API(支持浏览器缓存) img/server/{?} -->
<servlet>
<servlet-name>imgServerServlet</servlet-name>
<servlet-class>org.jeecgframework.web.system.servlet.ImgServerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>imgServerServlet</servlet-name>
<url-pattern>/img/server/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>imgServerServlet</servlet-name>
<url-pattern>/img-online/server/*</url-pattern>
</servlet-mapping>
<!-- 404错误页面 -->
<error-page>
<error-code>404</error-code>
<location>/webpage/common/404.htm</location>
</error-page>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- 首页 -->
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
</web-app>