Tomcat error: HTTP Status 500-wrapper cannot find servlet class
HTTP Status 500-wrapper cannot find servlet class Com.servlet.servlet.RegServlet or a class it depends on
type Exception
Message Wrapper cannot find servlet class Com.servlet.servlet.RegServlet or a class it depends on
Description The server encountered an internal error which prevented it from fulfilling this request.
exception
Javax.servlet.ServletException:Wrapper cannot find servlet class Com.servlet.servlet.RegServlet or a class it depends on< C1/>org.apache.catalina.valves.errorreportvalve.invoke (errorreportvalve.java:103)
Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:293)
Org.apache.coyote.http11.Http11Processor.process (http11processor.java:861)
Org.apache.coyote.http11.http11protocol$http11connectionhandler.process (http11protocol.java:606)
Org.apache.tomcat.util.net.jioendpoint$worker.run (jioendpoint.java:489)
Java.lang.Thread.run (Unknown Source )
Root cause
Java.lang.ClassNotFoundException:com.servlet.servlet.RegServlet
Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1680)
Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1526)
Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:103)
Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:293)
Org.apache.coyote.http11.Http11Processor.process (http11processor.java:861)
Org.apache.coyote.http11.http11protocol$http11connectionhandler.process (http11protocol.java:606)
Org.apache.tomcat.util.net.jioendpoint$worker.run (jioendpoint.java:489)
Java.lang.Thread.run (Unknown Source )
Solution:
This problem still occurs when you determine that the Servlet class is written correctly and that the configuration file is correct:
Preparation: See if the. class file is normally generated under the \web-inf\classes directory, if not generated, continue to the next step
First step: Empty project-> Clean Project
Step two: Empty the Tomcat cache-> the corresponding directory file \work\catalina\localhost the corresponding project
Step three: Re-publish the project
Thank you for reading, I hope to help you, thank you for your support for this site!