web项目中如何设置web.xml文件

2024-10-13 04:37:36

1、<display-name>ZHCity</display-name>,在<display-name>中设置需要显示的项目名称

web项目中如何设置web.xml文件

3、<context-param> <param-name>log4jConfigLocation</para罪焐芡拂m-name> <param-value>classpath:log4j.properties</param-value> </context-param>配置日志,方便在项目启动的时候记录日志。

web项目中如何设置web.xml文件

5、<filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>配置拦截器需要拦截的url,/*表示需要拦截所有的路径。

web项目中如何设置web.xml文件
猜你喜欢