web.xml 基本配置
<session-config>
<session-timeout>5</session-timeout>
</session-config>
<!-- ******* define filter begin ******* -->
<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>
<!-- ******* end ******* -->
<!-- openSession配置 -->
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- end -->
<!-- spring配置 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml,/WEB-INF/applicationContext-hibernate-resource-drp.xml,/WEB-INF/applicationContext-hibernate-resource-oa.xml,/WEB-INF/applicationContext-hibernate-resource-workflow.xml,/WEB-INF/applicationContext-hibernate-resource-res.xml,/WEB-INF/applicationContext-hibernate-service-admin.xml,/WEB-INF/applicationContext-hibernate-service-oa.xml,/WEB-INF/applicationContext-hibernate-service-sync.xml,/WEB-INF/applicationContext-hibernate-service-workflow.xml,/WEB-INF/applicationContext-hibernate-service-res.xml,/WEB-INF/applicationContext-chr.xml,/WEB-INF/applicationContext-hibernate-chr.xml,/WEB-INF/action-servlet-base.xml,/WEB-INF/action-servlet-admin.xml,/WEB-INF/action-servlet-oa.xml,/WEB-INF/action-servlet-wf.xml,/WEB-INF/action-servlet-res.xml,/WEB-INF/action-servlet-rpt.xml,/WEB-INF/xfire-servlet.xml,/WEB-INF/action-servlet-chr.xml,/WEB-INF/applicationContext-timer-oa.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- struts 配置 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping></web-app>
<!-- end -->
<!-- ******* define servlet begin ******* -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-oa.xml,/WEB-INF/struts-config-admin.xml,/WEB-INF/struts-config-wf.xml,/WEB-INF/struts-config-chr.xml,/WEB-INF/struts-config-res.xml,/WEB-INF/struts-config-rpt.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- ******* end ******* -->
web.xml 基本配置相关推荐
- web.xml中配置web监听器
web.xml中配置web监听器 在web.xml配置监听器,格式如下: <listener><listener-class>类全名</listener-class> ...
- 深入理解web.xml中配置/和/*的区别
在用SpringMVC进行web开发的时候,如果将DispathcerServlet对外访问的虚拟路径配置成/时,需要在Spring的配置文件中配置<mvc:default-servlet-ha ...
- 在配置文件web.xml中配置Struts2的启动信息
在配置文件web.xml中配置Struts2的启动信息: <?xml version="1.0" encoding="UTF-8"?> <we ...
- 关于Servlet的两种配置Web.xml文件配置或者使用(@WebServlet(name = ,urlPatterns = ))配置问题——WebServlet注解
在Servlet2.5规范之前,Java Web应用的绝大部分组件都通过web.xml文件来配置管理. Servlet3.0规范可通过Annotation来配置管理Web组件,因此web.xml文件可 ...
- SpringMVC在web.xml中配置DispatcherServlet拦截了静态资源访问
如图 在web.xml中配置DispatcherServlet时对于url-pattern的配置方式有以下几种情况: 1.配置为: *.do 或者是 *.action 时,拦截以.do或者.actio ...
- Web.xml中配置监听器Listener导致Tomcat无法启动
Web.xml中配置监听器Listener导致Tomcat无法启动 1.在pom.xml里导入 org.springframework spring-web 5.0.5.RELEASE 版本看你个人的 ...
- 在web.xml中配置过滤器
在web.xml中配置过滤器 <filter> <filter-name>loginFilter</filter-name>//过滤器名称 <filter-c ...
- 在springBoot中配置web.xml中配置的servlet
第一种 web.xml (截取的需要转换的) 当拦截到 /socke t时执行该servlet <servlet><servlet-name>websocket</ser ...
- 服务器启动时Webapp的web.xml中配置的加载顺序
一 1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Ser ...
- web.xml详细配置
1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Servl ...
最新文章
- objective-C NSNotificationCenter (通知)的使用方法
- Oracle控制文件恢复
- 老子《道德经》第四十一章
- 千万级的mysql数据库与sql优化方法
- wxpython 可视化开发pdf_MicroPython for the Internet of Things.pdf
- vgh电压高了有什么_智能变频电源的功能是什么?
- flash html5 chrome,为了支持 HTML5 ,谷歌 Chrome 浏览器将“封杀”Flash
- 去哪儿-08-city-search
- Spring Boot 日志配置 ——logback
- 用R和BioConductor进行基因芯片数据分析(四):芯片内归一化
- java applet 教程_教你构建第一个Java Applet程序
- 服务器光纤信号灯lan,光纤猫光信号灯不亮怎么办 光纤猫光信号灯不亮解决方法...
- 《数据蜂巢架构演进之路》阅读笔记
- 通达信自带指标 均线多头排列(DTPL)
- VSCode 与 WebStorm 横向对比
- ECC RDIMM 服务器内存条简介
- 优秀蓝牙耳机推荐,热销不错的四款蓝牙耳机推荐
- JAVA设计模式之概述
- 解决Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
- maven安装测试报JAVA_HOME路径安装错误
热门文章
- ServletContext、ServletConfig(FilterConfig)学习笔记
- jquery中的ready函数与window.onload谁先执行
- WPF and Silverlight 学习笔记(十九):WPF更换主题
- 关于mount nfs时-o nolock的问题
- AndroidStudio_安卓原生开发_精美自定义多选控件_多选Spinner_MultiSpinner_拿来即用---Android原生开发工作笔记144
- 大数据之-Hadoop3.x_Hadoop_HDFS_掉线时限参数设置---大数据之hadoop3.x工作笔记0079
- C++_类和对象_C++继承_多继承语法---C++语言工作笔记067
- 编程语言_java_面试题0002
- babel工作笔记001---babel从入门到入门
- System学习笔记003---Windows把内存变成快速虚拟硬盘