|
|
<?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_3_0.xsd"
|
|
|
metadata-complete="false" version="3.0">
|
|
|
<display-name>emr_research</display-name>
|
|
|
<welcome-file-list>
|
|
|
<welcome-file>login.jsp</welcome-file>
|
|
|
</welcome-file-list>
|
|
|
|
|
|
<!-- 字符编码过滤器 -->
|
|
|
<filter>
|
|
|
<filter-name>characterEncodingFilter</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>forceRequestEncoding</param-name>
|
|
|
<param-value>true</param-value>
|
|
|
</init-param>
|
|
|
<init-param>
|
|
|
<param-name>forceResponseEncoding</param-name>
|
|
|
<param-value>true</param-value>
|
|
|
</init-param>
|
|
|
</filter>
|
|
|
<filter-mapping>
|
|
|
<filter-name>characterEncodingFilter</filter-name>
|
|
|
<url-pattern>/*</url-pattern>
|
|
|
</filter-mapping>
|
|
|
|
|
|
<!--shiro-->
|
|
|
<!-- <filter>
|
|
|
<filter-name>shiroFiler</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>shiroFiler</filter-name>
|
|
|
<url-pattern>/*</url-pattern>
|
|
|
</filter-mapping>-->
|
|
|
<filter>
|
|
|
<filter-name>shiroFilter</filter-name>
|
|
|
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
|
|
</filter>
|
|
|
<filter-mapping>
|
|
|
<filter-name>shiroFilter</filter-name>
|
|
|
<url-pattern>/*</url-pattern>
|
|
|
</filter-mapping>
|
|
|
|
|
|
<!-- 启动spring的容器 -->
|
|
|
<context-param>
|
|
|
<param-name>contextConfigLocation</param-name>
|
|
|
<param-value>classpath:config/applicationContext.xml
|
|
|
classpath:config/spring-shiro.xml
|
|
|
</param-value>
|
|
|
</context-param>
|
|
|
|
|
|
<!-- 启动listener-->
|
|
|
<listener>
|
|
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
|
</listener>
|
|
|
|
|
|
<!-- springMVC的前端控制器,拦截所有的请求 -->
|
|
|
<servlet>
|
|
|
<servlet-name>dispatcherServlet</servlet-name>
|
|
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
|
<load-on-startup>1</load-on-startup>
|
|
|
</servlet>
|
|
|
|
|
|
<servlet-mapping>
|
|
|
<servlet-name>dispatcherServlet</servlet-name>
|
|
|
<url-pattern>/</url-pattern>
|
|
|
</servlet-mapping>
|
|
|
|
|
|
<context-param>
|
|
|
<param-name>log4jConfigLocation</param-name>
|
|
|
<param-value>classpath:config/log4j.properties</param-value>
|
|
|
</context-param>
|
|
|
|
|
|
<!-- <servlet-mapping>
|
|
|
<servlet-name>default</servlet-name>
|
|
|
<url-pattern>*.js</url-pattern>
|
|
|
<url-pattern>*.css</url-pattern>
|
|
|
<url-pattern>/assets/*"</url-pattern>
|
|
|
<url-pattern>/images/*</url-pattern>
|
|
|
</servlet-mapping>-->
|
|
|
</web-app>
|