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 基本配置的更多相关文章
- JavaWeb工程中web.xml基本配置
一.理论准备 先说下我记得xml规则,必须有且只有一个根节点,大小写敏感,标签不嵌套,必须配对. web.xml是不是必须的呢?不是的,只要你不用到里面的配置信息就好了,不过在大型web工程下使用该文 ...
- spring web.xml 难点配置总结
web.xml web.xml是所有web项目的根源,没有它,任何web项目都启动不了,所以有必要了解相关的配置. ContextLoderListener,ContextLoaderServlet, ...
- web.xml 文件配置01
web.xml 文件配置01 前言:一般的web工程中都会用到web.xml,方便开发web工程.web.xml主要用来配置Filter.Listener.Servlet等.但是要说明的是web. ...
- SSH web.xml文件配置
启动一个WEB项目的时候, WEB容器会去读取它的配置文件web.xml web.xml中配置的加载优先级:context-param -> listener -> filter -> ...
- 在web.xml中配置error-page
在web.xml中配置error-page 在web.xml中有两种配置error-page的方法,一是通过错误码来配置,而是通过异常的类型来配置,分别举例如下: 一. 通过错误码来配置error ...
- Struts2 web.xml文件配置
在导入了项目需要使用的核心jar包之后需要在web.xml中配置Struts. 1. Struts2的知识点普及: Struts2共有5类配置文件,分别罗列如下: 1), Web.xml; 在没有使用 ...
- struts2在web.xml中配置详情
web.xml是web应用中载入有关servlet信息的重要配置文件,起着初始化servlet,filter等web程序的作用. 通常,全部的MVC框架都须要Web应用载入一个核心控制器.那採取什么方 ...
- web.xml中配置log4j
1.将 commons-logging.jar和 log4j.jar加入你的项目中:2.在src/下创建log4j.properties|log4j.xml文件:3.在web.xml中配置log4j的 ...
- web.xml中配置Spring中applicationContext.xml的方式
2011-11-08 16:29 web.xml中配置Spring中applicationContext.xml的方式 使用web.xml方式加载Spring时,获取Spring applicatio ...
- web.xml 中配置了error-page但不起作用问题
问题: 在web.xml 中配置了 error-page,但是好像不起作用,就是跳转不到指定的页面. 配置信息如下: <!-- 400错误 --> <error-page> & ...
随机推荐
- Guava学习之Preconditions
在编写程序的时候,很多时候都需要检查输入的参数是否符合我们的需要,比如人的年龄需要大于0,名字不能为空:如果不符合这两个要求,我们将认为这个对象是不合法的,这时候我们需要编写判断这些参数是否合法的函数 ...
- oracle 建表时显示ORA-00984: 列在此处不允许
oracle 建表时显示ORA-00984: 列在此处不允许 CreationTime--2018年7月19日16点10分 Author:Marydon 1.情景展示 使用plsql建表时,报错 ...
- python之函数用法round()
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python之函数用法round() #http://www.cnblogs.com/hongfei/p/3 ...
- eval、exec、execfile
# -*- coding: utf-8 -*- #python 27 #xiaodeng #http://blog.csdn.net/azhao_dn/article/details/6921654 ...
- spring cloud学习地址
http://book.itmuch.com/1%20%E5%BE%AE%E6%9C%8D%E5%8A%A1%E7%AE%80%E4%BB%8B/1%20%E5%BE%AE%E6%9C%8D%E5%8 ...
- PLSQL常用配置
峰回路转,此乃常客! 01.PL/SQL Developer记住登陆密码 为了工作方便希望PL/SQL Developer记住登录Oracle的用户名和密码: 设置方法: PL/SQL Develop ...
- 【LeetCode】64. Minimum Path Sum
Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to b ...
- 基于node.js的web框架express
1.安装node.js方法: window :https://nodejs.org/en/ linux:http://www.runoob.com/nodejs/nodejs-install-setu ...
- Linux内核中锁机制之内存屏障、读写自旋锁及顺序锁
在上一篇博文中笔者讨论了关于原子操作和自旋锁的相关内容,本篇博文将继续锁机制的讨论,包括内存屏障.读写自旋锁以及顺序锁的相关内容.下面首先讨论内存屏障的相关内容. 三.内存屏障 不知读者是是否记得在笔 ...
- Gitbook 生成 pdf 中文字体错乱问题解决办法
Gitbook 生成 pdf 中文字体错乱问题解决办法 用过 Gitbook 的都知道, Gitbook 会自动生成 pdf 以提供下载, 但十分遗憾的是自动生成的 pdf 对中文的支持并不好, ...