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. Guava学习之Preconditions

    在编写程序的时候,很多时候都需要检查输入的参数是否符合我们的需要,比如人的年龄需要大于0,名字不能为空:如果不符合这两个要求,我们将认为这个对象是不合法的,这时候我们需要编写判断这些参数是否合法的函数 ...

  2. oracle 建表时显示ORA-00984: 列在此处不允许

      oracle 建表时显示ORA-00984: 列在此处不允许 CreationTime--2018年7月19日16点10分 Author:Marydon 1.情景展示 使用plsql建表时,报错 ...

  3. python之函数用法round()

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #python之函数用法round() #http://www.cnblogs.com/hongfei/p/3 ...

  4. eval、exec、execfile

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #http://blog.csdn.net/azhao_dn/article/details/6921654 ...

  5. 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 ...

  6. PLSQL常用配置

    峰回路转,此乃常客! 01.PL/SQL Developer记住登陆密码 为了工作方便希望PL/SQL Developer记住登录Oracle的用户名和密码: 设置方法: PL/SQL Develop ...

  7. 【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 ...

  8. 基于node.js的web框架express

    1.安装node.js方法: window :https://nodejs.org/en/ linux:http://www.runoob.com/nodejs/nodejs-install-setu ...

  9. Linux内核中锁机制之内存屏障、读写自旋锁及顺序锁

    在上一篇博文中笔者讨论了关于原子操作和自旋锁的相关内容,本篇博文将继续锁机制的讨论,包括内存屏障.读写自旋锁以及顺序锁的相关内容.下面首先讨论内存屏障的相关内容. 三.内存屏障 不知读者是是否记得在笔 ...

  10. Gitbook 生成 pdf 中文字体错乱问题解决办法

    Gitbook 生成 pdf 中文字体错乱问题解决办法   用过 Gitbook 的都知道, Gitbook 会自动生成 pdf 以提供下载, 但十分遗憾的是自动生成的 pdf 对中文的支持并不好, ...