SSH对于web.xml的配置
来源:互联网 发布:通信网络设计师是什么 编辑:程序博客网 时间:2024/05/21 09:30
1、针对Struts2的配置
<filter><filter-name>SSH_1</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class></filter><filter-mapping><filter-name>SSH_1</filter-name><url-pattern>/*</url-pattern></filter-mapping><filter-class><url-pattern>
注册strtus2默认的过滤器,会过滤用户的请求。过滤哪些请求(过滤所有请求)
2、针对Spring的配置
<!-- Spring 监听器 --><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener>
注册Spring默认的监听器,会自动转配applicationContext.xml配置信息到Spring容器(上下文)中。
<context-param><param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext.xml</param-value><!-- <param-value>/WEB-INF/applicationContext.xml</param-value> --></context-param>
applicationContext.xml源码中放在/WEB-INF/applicationContext.xml
,也可以放在其它位置
放在src下,则需要配置:classpath:applicationContext.xml。
3、针对日志管理log
<!--spring log4j监听器 --><listener><listener-class>org.springframework.web.util.Log4jConfigListener</listener-class></listener><!--log4j配置文件加载 --><context-param><param-name>log4jConfigLocation</param-name><param-value>/WEB-INF/log4j.properties</param-value></context-param><!--启动一个watchdog线程每1800秒扫描一下log4j配置文件的变化 --><context-param><param-name>log4jRefreshInterval</param-name><param-value>1800000</param-value></context-param>
Spring与log4j结合,具备打印日志的功能,首先配置Springlog4j监听器,然后加载log4j的配置文件(里面说明了要打印哪些内容以及打印日志存的目录),启动一个watchdog线程每1800秒扫描一下log4j配置文件的变化
1 0
- SSH对于web.xml的配置
- ssh项目中,对于spring的bean.xml和web.xml文件的基本配置
- ssh的web.xml配置
- SSH配置:web.xml
- SSH web.xml配置
- SSH web.xml配置
- SSH web.xml配置
- ssh整合web.xml的配置
- SSH整合中web.xml的配置
- ssh整合后web.xml的配置
- SSH中web.xml文件的配置
- ssh开发web.xml必须的配置
- SSH配置中web.xml的要点
- java中对于web.xml文件,filter的配置解释
- SSH中 applicationcontext.xml与web.xml的配置
- SSH中的web.xml配置
- SSH配置之web.xml
- SSH配置之web.xml .
- JS中this的作用
- [Rails]表单提交时,post与patch的内部转化
- 如何计算程序时间复杂度(实战篇)
- Tunnel:论如何在内网中自由渗透 20160721
- 界门纲目科属种
- SSH对于web.xml的配置
- 关于Android Launcher3相关优秀文章的记录
- 揭秘:攻击者如何在Kali Linux中搭建钓鱼热点 20160720
- js时间戳转成date
- Express框架学习
- iOS9.0 以后状态栏动态显示与隐藏的解决办法!!!!!
- [232] Implement Queue using Stacks
- HDU 3037 Saving Beans
- 单词的记忆 —— 对称与词组