记录一个学习spring搭建web项目的过程中遇到的问题,在web.xml中部署org.springframework.web.context.ContextLoaderListener时就会导致tomcat启动失败。这是我的web.xml配置文件:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/resources/appliction.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
造成这个问题是因为在tomcat部署时,缺少spring-web的jar包导致的。
解决方法:
把spring-web的包添加进去,然后再重新启动tomcat,就好了。