web.xml加载spring的两种方式(servlet和listener)
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
?xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
?xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee?
?http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
?
?<listener>
??<listener-class>
???org.springframework.web.context.ContextLoaderListener
??</listener-class>
?</listener>
?<!--contextConfigLocation在 ContextLoaderListener类中的默认值是 /WEB-INF/applicationContext.xml-->
?<context-param>
??<param-name>contextConfigLocation</param-name>
??<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
??<!-- <param-value>classpath:applicationContext*.xml</param-value> -->
?</context-param>
?<welcome-file-list>
??<welcome-file>index.jsp</welcome-file>
?</welcome-file-list>
</web-app>