首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

web.xml配备学习

2012-08-09 
web.xml配置学习首先需要配置ContextLoaderListener,如果要配置Log4jConfigListener,那么一定要配置在Cont

web.xml配置学习



首先需要配置ContextLoaderListener,如果要配置Log4jConfigListener,那么一定要配置在ContextLoaderListener的前面。
ContextLoaderListener是加载应用的上下方环境(context),如果把这个context记为A,那么A下面还可以有子Context,这些Context配置在以*-servlet.xml的文件中。可以配置多个*-servlet.xml,它们共享context A。
Log4j的配置文件可以定制:
        <context-param><param-name>log4jConfigLocation</param-name><param-value>/WEB-INF/classes/log4j.properties</param-value></context-param>

热点排行