Servlet : SEVERE: Allocate exception for servlet

I had the same problem! Spent 2 hours searching for solution! And here it is!

WebContent (under Dynamic Web Project) -> WEB-INF -> lib (it's empty- all right) -> right click on it (lib) -> Build Path -> Use as Source Folder.

DONE!


Somehow you are missing the servlet-api.jar. It should be located in the tomcat\lib folder.


After looking into the Exceptions, you got, some where you have misplaced the jar files

(servlet-api.jar). It should be under your Project/WEB-INF/lib folder. I think it will

works if your jar files are in the path specified above.


Finally , got my mistake. This was a problem caused by the eclipse build. Since the build was not proper, the class files where corrupted. I cleaned up the whole project, took a fresh build, now its working fine. Thanks for your replies.