<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"> <welcome-file-list>
<welcome-file>index.do</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list> <!-- 激活Tomcat的defaultServlet处理静态资源 -->
<!--<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>*.png</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>*.css</url-pattern>
</servlet-mapping>--> <!--设置filter编码过滤器,解决中文乱码问题-->
<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> <!--spring 和security 配置文件-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml,classpath:spring-security.xml</param-value>
</context-param> <context-param>
<param-name>webAppRootKey</param-name>
<param-value>lingdong.webapp.root</param-value>
</context-param>
<!--spring security 过滤器-->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> <listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener> <!--spring mvc 配置文件-->
<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:spring-servlet.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> <!--取消jsp语言产生的空行-->
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
</jsp-config> </web-app>

最新文章

  1. WPF-流文档元素
  2. SQL Server提高事务复制效率优化(二)快照初始化优化
  3. 在ubunt14.04(linux)下利用cmake编译运行opencv程序
  4. jquery select选中表单特效三级联动
  5. X3DOM新增剪裁平面节点ClipPlane支持
  6. PHP程序员必须清楚的问题汇总
  7. /etc/crontab文件和crontab -e命令区别
  8. 如何在github上展示作品——为你的项目生成一个快速访问的网址如(DaisyWang88.github.io)
  9. Android 使用Application类保存应用的全局数据
  10. 关于 iOS 刷新效果实现的思路 和 mac软件网址推荐
  11. C标准库函数实现之strstr(转)
  12. 分布式数据库中间件–(3) Cobar对简单select命令的处理过程
  13. BZOJ1782: [Usaco2010 Feb]slowdown 慢慢游
  14. app额外后台运行操作
  15. 免费后台管理UI界面、html源码推荐
  16. cogs 619. [金陵中学2007] 传话
  17. iTOP-4418开发板Android 5.1/4.4丨Linux + Qt5.7丨Ubuntu12.04系统
  18. 安装PackageControl
  19. rabbitmp安装记录
  20. 【开源】 bsf.mvc spingboot的扩展

热门文章

  1. 谈谈JS的观察者模式(自定义事件)
  2. 在Windows上编译和调试CoreCLR
  3. VSCode添加Sciter脚本Tiscript高亮支持
  4. javaScript中的小细节-script标签中的预解析
  5. 茂名石化BPM应用实践 ——业务协同及服务共享平台建设和应用
  6. Maven仓库搭建和配置
  7. SpringMVC视图解析器
  8. mono for android 获取手机照片或拍照并裁剪保存
  9. TFS 2015(Visual Studio Team Foundation Server)的下载和安装
  10. Lesson 16 A polite request