错误:找不到类org.springframework.web.context.ContextLoaderListener

 

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListenerjava

错误:找不到类org.springframework.web.context.ContextLoaderListenerweb

Java虚拟机是根据Java ClassLoader(类加载器)决定如何加载Class。 
系统默认提供了3个ClassLoader 
Root ClassLoader,ClassPath Loader,Ext ClassLoader 
咱们也能够编写本身的ClassLoader,去加载特定环境下的Jar文件。 
能不能加载Jar,加载哪里的Jar,是由ClassLoader决定的。 
spring

问题: 导入的仅仅是jar包的引用,例如在eclipse中经过build path加进user lib……(相似快捷方式) 
这种在Java Application中没问题,但在web Application中可能会出现找不到类的异常。 
在WEB Application中jar包最好放在webroot或webcontent下的lib文件夹内,特别是xml中用到的jar包。 
app

解决:1.jar包放在webroot或webcontent下的lib文件夹内eclipse

   2. 右击项目名称-Properties--Deployment Assembly--右边点击ADD-Java Build path entries --添加自定义的user-libui