Java EE Module Dependencies Eclipse
-
26-06-2021 - |
Question
I am developing a web application with Eclipse. I've set the build path to include my classes but sometimes I get the ClassNotFoundException
and now I'm getting:
SEVERE: Allocate exception for servlet MyServlet
java.lang.ClassNotFoundException: com.free.MyServlet
From the Servlet! How is this possible?
Solution
I assume that you are using the integrated to Eclipse tomcat.
Most probably, your classes have not been copied under WEB-INF\lib
of your web app in tomcat. Eclipse does that. Copy them mannually (from your project's bin
directory). I am not sure how you keep it in sych with your coding project to avoid the mannual step
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow