tomcat報錯org.springframework.web.context.ContextLoaderListener找不到。
最后解決辦法:將jar包copy到web-inf下面的lib中。
你可以在web app libary是不是空,或者點不開。
引用網友的:
http://topic.csdn.net/u/20090216/19/3c955432-e708-4338-961f-8db9db7f5df1.html
可能是jar包位置導致的。
Java虛擬機是根據Java ClassLoader(類加載器)決定如何加載Class。
系統默認提供了3個ClassLoader
Root ClassLoader,ClassPath Loader,Ext ClassLoader
我們也可以編寫自己的ClassLoader,去加載特定環境下的Jar文件。
能不能加載Jar,加載哪里的Jar,是由ClassLoader決定的。
樓主的問題可能是 導入的僅僅是jar包的引用,例如在eclipse中通過build path加進user lib……(類似快捷方式)
這種在Java Application中沒問題,但在web Application中可能會出現找不到類的異常。
在WEB Application中jar包最好放在webroot或webcontent下的lib文件夾內,特別是xml中用到的jar包。