I was developing a web application, deployed and run from inside eclipse embedded tomcat server. Few days back when I accessed this project I found that project is not running and throwing some ClassNotFound exception that system could not find servlet class. I verified everything like servlet class was in place and web.xml file had correct entries.
I wasted lot of time trying to find over Google why server container is not loading my servlet, nothing I found useful then suddenly this thing popped into my mind that maybe my .class files are not found or not being generated after clean build. And yes when i peeked into “WebContent/build/classes” files nothing was there, so that was the source of all evil.
Why eclipse is not building class files ? “Build automatically” was checked. I search a lot here is one thread where peoples have tried all possible tactics https://forums.oracle.com/forums/thread.jspa?threadID=1518457
But this also didnt helped me, but now I am perfectly able to compiled it and run my project here is how
Besides Console view there will be “Marker” or “Problems” window that logs flagged issues for the project.Iif there are any error eclipse will not compile the project, you will need to first resolve those flags
Every time you make any change in project do Right click on project -> Refresh and marker window will update itself, if major errors are gone you will be now able to do Auto build when running the app.