INFO: Marking servlet MyServlet as unavailable Jun 02, 2015 12:04:05 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /MyProject threw load() exception java.lang.ClassNotFoundException: com.mycompany.myproject.servlet.MyServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Jun 02, 2015 12:04:05 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-apr-8080"] Jun 02, 2015 12:04:05 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-apr-8009"] Jun 02, 2015 12:04:05 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 9837 ms
This is the console when I deploy my project in eclipse's server(tomcat).It does not create class files of .java files.But when I deployed my project's .war file in C:\apache-tomcat-7.0.41\webapps ,it runs fine. I have searched everywhere on the internet,tried changing eclipse's preference, but the problem still persists.