七、通用web.xml文件
1、log4j 配置
配置webAppRootKey,在別處可以調用此別名。log4jConfigLocation,配置log4j.properties文件的位置。log4jRefreshInterval掃描配置文件的時間。org.springframework.web.util.Log4jConfigListener。spring中log4j的監聽類。
2、設置servlet編碼
使用org.springframework.web.filter.CharacterEncodingFilter過濾器。
3、設置BackURL
4、Spring配置文件
5、配置servlet
servlet-class使用org.springframework.web.servlet.DispatcherServlet類,加載spring-servlet.xml文件。
6、默認歡迎頁面