Web.xml 中加入log4j
来源:互联网 发布:php模拟form post提交 编辑:程序博客网 时间:2024/05/16 11:58
配置文件如下。web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><context-param><param-name>contextConfigLocation</param-name><param-value>jdbc-context.xml</param-value></context-param> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>6000</param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!-- spring 配置 --><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><!-- 配置spring MVC --><servlet><servlet-name>spring-mvc</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><init-param><param-name>contextConfigLocation</param-name><!-- <param-value>classpath:/META-INF/spring-servlet.xml</param-value> --><param-value>spring-servlet.xml</param-value></init-param><load-on-startup>1</load-on-startup></servlet><servlet-mapping><servlet-name>spring-mvc</servlet-name><url-pattern>/</url-pattern></servlet-mapping><filter><filter-name>encodingFilter</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class></filter><filter-mapping><filter-name>encodingFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping><welcome-file-list><welcome-file>index.html</welcome-file><welcome-file>index.jsp</welcome-file></welcome-file-list></web-app>
0 1
- Web.xml 中加入log4j
- java web项目中加入log4j
- web.xml中加入标签时报错 |
- 在web.xml中加入过滤器
- spring3 mvc中 web.xml 加入 OpenSessionInView
- 在Spring boot中加入web.xml
- LOG4J,SLF4J日志,web.xml中webAppRootKey
- log4j在web.xml中如何配置
- web.xml中log4j配置注意点
- log4j.web.xml
- log4j.xml web.xml配置
- Web开发加入Log4j日志管理
- web.xml中关于log4j的设置及范例说明
- web.xml中关于log4j的设置及范例说明
- JBOSS jboss-log4j.xml文件中配置web工程日志
- web.xml中关于log4j的设置及范例说明
- JBOSS jboss-log4j.xml文件中配置web工程日志
- web.xml中关于log4j的设置及范例说明
- SiteMesh教程
- mac svn服务器搭建
- HDU 1106 排序
- AWK二维数组的用法总结
- 面试题10:数位重组
- Web.xml 中加入log4j
- acm竞赛常用头文件
- 乱七八糟的自我总结
- 算法竞赛入门经典(第2版)习题3-5 谜题 Puzzle UVa227
- 面试题12:求一维数组中最小的k个数 top k I
- BackBone入门指南(三):Events(事件管理)
- cocos2d-x-2.2.4 (二) 移动MyGame文件夹
- 机顶盒CA解密流程
- 夏不为利,自然之宝、汤臣倍健暑期盛宴