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?

Était-ce utile?

La 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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top