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.
81 lines
2.4 KiB
81 lines
2.4 KiB
<?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"
|
|
id="WebApp_ID" version="2.5">
|
|
<welcome-file-list>
|
|
<welcome-file>dorm/login.html</welcome-file>
|
|
</welcome-file-list>
|
|
<!-- 加载spring容器 -->
|
|
<context-param>
|
|
<param-name>contextConfigLocation</param-name>
|
|
<param-value>classpath:application.xml</param-value>
|
|
</context-param>
|
|
<listener>
|
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
</listener>
|
|
|
|
<!-- 解决post乱码 -->
|
|
<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>forceEncoding</param-name> <param-value>true</param-value>
|
|
</init-param> -->
|
|
</filter>
|
|
<filter-mapping>
|
|
<filter-name>CharacterEncodingFilter</filter-name>
|
|
<url-pattern>/*</url-pattern>
|
|
</filter-mapping>
|
|
|
|
|
|
<servlet>
|
|
<servlet-name>springMvc</servlet-name>
|
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
<init-param>
|
|
<param-name>contextConfigLocation</param-name>
|
|
<param-value>classpath:springmvc.xml</param-value>
|
|
</init-param>
|
|
<load-on-startup>1</load-on-startup>
|
|
</servlet>
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>default</servlet-name>
|
|
<url-pattern>*.css</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>default</servlet-name>
|
|
<url-pattern>*.js</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>default</servlet-name>
|
|
<url-pattern>*.png</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>default</servlet-name>
|
|
<url-pattern>*.jpg</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>default</servlet-name>
|
|
<url-pattern>*.gif</url-pattern>
|
|
</servlet-mapping>
|
|
<servlet-mapping>
|
|
<servlet-name>default</servlet-name>
|
|
<url-pattern>*.html</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>springMvc</servlet-name>
|
|
<url-pattern>/</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
</web-app> |