報錯:The type javax.servlet.http.HttpServletRequest cannot be resolved
The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files. 這個錯誤表示的意思還不太清楚,可能是,myeclipse不會自動找這個包servlet.jar,就算在相應工程/WebRoot/WEB-INF/lib裏麵,而且奇怪的是該錯誤提示總是在代碼的最前麵 ( 第一行位置 )
解決辦法:加入相關類的 jar 包到你的 classpath (右鍵點擊某個jar包--build path--config build path...---liberary---Add external jar library),此處加入 servelet-api.jar(此包在eclipse/plugins目錄中可以找得到,其他類似的錯誤也用相同的方法解決) 到 classpath ,OK 。
java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanFactory
If you're getting that error the class simply isn't there. Please double check that you have properly added the spring classes to the classpath of the app.