session timeout 配置

  1. <session-config>
  2. <session-timeout>5</session-timeout>
  3. </session-config>



spring 默认编码配置

  1. <!-- ******* define filter begin ******* -->
  2. <filter>
  3. <filter-name>characterEncodingFilter</filter-name>
  4. <filter-class>
  5. org.springframework.web.filter.CharacterEncodingFilter
  6. </filter-class>
  7. <init-param>
  8. <param-name>encoding</param-name>
  9. <param-value>UTF-8</param-value>
  10. </init-param>
  11. <init-param>
  12. <param-name>forceEncoding</param-name>
  13. <param-value>true</param-value>
  14. </init-param>
  15. </filter>
  16. <filter-mapping>
  17. <filter-name>characterEncodingFilter</filter-name>
  18. <url-pattern>/*</url-pattern>
  19. </filter-mapping>
  20. <!-- ******* end ******* -->



hibernate opensession 配置

  1. <!-- openSession配置 -->
  2. <filter>
  3. <filter-name>hibernateFilter</filter-name>
  4. <filter-class>
  5. org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
  6. </filter>
  7. <filter-mapping>
  8. <filter-name>hibernateFilter</filter-name>
  9. <url-pattern>*.action</url-pattern>
  10. </filter-mapping>
  11. <filter-mapping>
  12. <filter-name>hibernateFilter</filter-name>
  13. <url-pattern>/*</url-pattern>
  14. </filter-mapping>
  15. <!-- end -->

spring context 配置
  1. <!-- spring配置 -->
  2. <context-param>
  3. <param-name>contextConfigLocation</param-name>
  4. <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>
  5. </context-param>
  6. <listener>
  7. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  8. </listener>

struts2 配置:

  1. <!-- struts 配置 -->
  2. <filter>
  3. <filter-name>struts2</filter-name>
  4. <filter-class>
  5. org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
  6. </filter-class>
  7. </filter>
  8. <filter-mapping>
  9. <filter-name>struts2</filter-name>
  10. <url-pattern>/*</url-pattern>
  11. </filter-mapping></web-app>
  12. <!-- end -->

struts1 配置 :

  1. <!-- ******* define servlet begin ******* -->
  2. <servlet>
  3. <servlet-name>action</servlet-name>
  4. <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  5. <init-param>
  6. <param-name>config</param-name>
  7. <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>
  8. </init-param>
  9. <init-param>
  10. <param-name>debug</param-name>
  11. <param-value>3</param-value>
  12. </init-param>
  13. <init-param>
  14. <param-name>detail</param-name>
  15. <param-value>3</param-value>
  16. </init-param>
  17. <load-on-startup>0</load-on-startup>
  18. </servlet>
  19. <servlet-mapping>
  20. <servlet-name>action</servlet-name>
  21. <url-pattern>*.do</url-pattern>
  22. </servlet-mapping>
  23. <!-- ******* end ******* -->


web.xml 基本配置的更多相关文章

  1. JavaWeb工程中web.xml基本配置

    一.理论准备 先说下我记得xml规则,必须有且只有一个根节点,大小写敏感,标签不嵌套,必须配对. web.xml是不是必须的呢?不是的,只要你不用到里面的配置信息就好了,不过在大型web工程下使用该文 ...

  2. spring web.xml 难点配置总结

    web.xml web.xml是所有web项目的根源,没有它,任何web项目都启动不了,所以有必要了解相关的配置. ContextLoderListener,ContextLoaderServlet, ...

  3. web.xml 文件配置01

    web.xml 文件配置01   前言:一般的web工程中都会用到web.xml,方便开发web工程.web.xml主要用来配置Filter.Listener.Servlet等.但是要说明的是web. ...

  4. SSH web.xml文件配置

    启动一个WEB项目的时候, WEB容器会去读取它的配置文件web.xml web.xml中配置的加载优先级:context-param -> listener -> filter -> ...

  5. 在web.xml中配置error-page

    在web.xml中配置error-page 在web.xml中有两种配置error-page的方法,一是通过错误码来配置,而是通过异常的类型来配置,分别举例如下: 一.   通过错误码来配置error ...

  6. Struts2 web.xml文件配置

    在导入了项目需要使用的核心jar包之后需要在web.xml中配置Struts. 1. Struts2的知识点普及: Struts2共有5类配置文件,分别罗列如下: 1), Web.xml; 在没有使用 ...

  7. struts2在web.xml中配置详情

    web.xml是web应用中载入有关servlet信息的重要配置文件,起着初始化servlet,filter等web程序的作用. 通常,全部的MVC框架都须要Web应用载入一个核心控制器.那採取什么方 ...

  8. web.xml中配置log4j

    1.将 commons-logging.jar和 log4j.jar加入你的项目中:2.在src/下创建log4j.properties|log4j.xml文件:3.在web.xml中配置log4j的 ...

  9. web.xml中配置Spring中applicationContext.xml的方式

    2011-11-08 16:29 web.xml中配置Spring中applicationContext.xml的方式 使用web.xml方式加载Spring时,获取Spring applicatio ...

  10. web.xml 中配置了error-page但不起作用问题

    问题: 在web.xml 中配置了 error-page,但是好像不起作用,就是跳转不到指定的页面. 配置信息如下: <!-- 400错误 --> <error-page> & ...

随机推荐

  1. 查询SQL存储过程创建时间

    select  [name] ,create_date ,modify_date FROM  sys.all_objects where  type_desc = N'SQL_STORED_PROCE ...

  2. 交叉编译OpenWrt 定制固件

    在Centos7上交叉编译生成OpenWrt固件 安装ss-* 获取最新的ss, 当前是 wget https://github.com/shadowsocks/shadowsocks-libev/a ...

  3. mybatis标签之——关联映射

    关联关系是面向对象分析.面向对象设计最重要的知识.合理的关联映射将大大简化持久层数据的访问.关联关系大致分为以下三类: 一对一 一对多 多对多 1. 一对一 一对一关系推荐使用唯一主外键关联,即两张表 ...

  4. SQLite简单介绍

    一.离线缓存 在项目开发中,通常都需要对数据进行离线缓存的处理,如新闻数据的离线缓存等. 说明:离线缓存一般都是把数据保存到项目的沙盒中.有以下几种方式 (1)归档:NSCodeing.NSKeyed ...

  5. 【LeetCode】164. Maximum Gap (2 solutions)

    Maximum Gap Given an unsorted array, find the maximum difference between the successive elements in ...

  6. Putty设置删除

    1. 开始→运行→cmd(进入字符界面) 2.切换目录到putty安装目录 3.执行以下清理命令 4.会跳出如下提示信息 点击[是(Y)]

  7. Android中如何实现文件下载

        最近做一个项目需要从服务器下载图片到本地sdcard,上网查找了一些例子,下面这个比较合适,原文内容如下:   我们在开发中经常需要从服务器下载文件,下载的内容可能有交换的信息,缓存的图片,程 ...

  8. 兔子--eclipse设置编码格式

    设置编码格式 a:设置eclipse的默认编码格式:window->preferences->Workspace->Text File Encoding b:设置单个项目的编码格式: ...

  9. Python 列表 reverse() 方法

    描述 Python 列表 reverse() 方法对列表中的元素进行反向排序. 语法 reverse() 方法语法: L.reverse() 参数 无. 返回值 该方法没有返回值,但是会对列表的元素进 ...

  10. js 与 php 时间戳的区别(毫秒与秒的计算方式)

    js是以毫秒为单位计算的,php是以秒为单位计算的,所以转换时记得*/1000 //距离时间的时间戳 var suoshengshijian = <?php echo $expire_time_ ...