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. web.xml中配置web监听器

    web.xml中配置web监听器 在web.xml配置监听器,格式如下: <listener><listener-class>类全名</listener-class> ...

  2. 深入理解web.xml中配置/和/*的区别

    在用SpringMVC进行web开发的时候,如果将DispathcerServlet对外访问的虚拟路径配置成/时,需要在Spring的配置文件中配置<mvc:default-servlet-ha ...

  3. 在配置文件web.xml中配置Struts2的启动信息

    在配置文件web.xml中配置Struts2的启动信息: <?xml version="1.0" encoding="UTF-8"?> <we ...

  4. 关于Servlet的两种配置Web.xml文件配置或者使用(@WebServlet(name = ,urlPatterns = ))配置问题——WebServlet注解

    在Servlet2.5规范之前,Java Web应用的绝大部分组件都通过web.xml文件来配置管理. Servlet3.0规范可通过Annotation来配置管理Web组件,因此web.xml文件可 ...

  5. SpringMVC在web.xml中配置DispatcherServlet拦截了静态资源访问

    如图 在web.xml中配置DispatcherServlet时对于url-pattern的配置方式有以下几种情况: 1.配置为: *.do 或者是 *.action 时,拦截以.do或者.actio ...

  6. Web.xml中配置监听器Listener导致Tomcat无法启动

    Web.xml中配置监听器Listener导致Tomcat无法启动 1.在pom.xml里导入 org.springframework spring-web 5.0.5.RELEASE 版本看你个人的 ...

  7. 在web.xml中配置过滤器

    在web.xml中配置过滤器 <filter> <filter-name>loginFilter</filter-name>//过滤器名称 <filter-c ...

  8. 在springBoot中配置web.xml中配置的servlet

    第一种 web.xml (截取的需要转换的) 当拦截到 /socke t时执行该servlet <servlet><servlet-name>websocket</ser ...

  9. 服务器启动时Webapp的web.xml中配置的加载顺序

    一 1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Ser ...

  10. web.xml详细配置

    1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Servl ...

最新文章

  1. objective-C NSNotificationCenter (通知)的使用方法
  2. Oracle控制文件恢复
  3. 老子《道德经》第四十一章
  4. 千万级的mysql数据库与sql优化方法
  5. wxpython 可视化开发pdf_MicroPython for the Internet of Things.pdf
  6. vgh电压高了有什么_智能变频电源的功能是什么?
  7. flash html5 chrome,为了支持 HTML5 ,谷歌 Chrome 浏览器将“封杀”Flash
  8. 去哪儿-08-city-search
  9. Spring Boot 日志配置 ——logback
  10. 用R和BioConductor进行基因芯片数据分析(四):芯片内归一化
  11. java applet 教程_教你构建第一个Java Applet程序
  12. 服务器光纤信号灯lan,光纤猫光信号灯不亮怎么办 光纤猫光信号灯不亮解决方法...
  13. 《数据蜂巢架构演进之路》阅读笔记
  14. 通达信自带指标 均线多头排列(DTPL)
  15. VSCode 与 WebStorm 横向对比
  16. ECC RDIMM 服务器内存条简介
  17. 优秀蓝牙耳机推荐,热销不错的四款蓝牙耳机推荐
  18. JAVA设计模式之概述
  19. 解决Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
  20. maven安装测试报JAVA_HOME路径安装错误

热门文章

  1. ServletContext、ServletConfig(FilterConfig)学习笔记
  2. jquery中的ready函数与window.onload谁先执行
  3. WPF and Silverlight 学习笔记(十九):WPF更换主题
  4. 关于mount nfs时-o nolock的问题
  5. AndroidStudio_安卓原生开发_精美自定义多选控件_多选Spinner_MultiSpinner_拿来即用---Android原生开发工作笔记144
  6. 大数据之-Hadoop3.x_Hadoop_HDFS_掉线时限参数设置---大数据之hadoop3.x工作笔记0079
  7. C++_类和对象_C++继承_多继承语法---C++语言工作笔记067
  8. 编程语言_java_面试题0002
  9. babel工作笔记001---babel从入门到入门
  10. System学习笔记003---Windows把内存变成快速虚拟硬盘