Tomcat error: HTTP Status 500, tomcatstatus
HTTP Status 500-Wrapper cannot find servlet class com. servlet. servlet. RegServlet or a class it depends on
TypeException report
MessageWrapper cannot find servlet class com. servlet. servlet. RegServlet or a class it depends on
DescriptionThe server encountered an internal error that prevented it from fulfilling this request.
Exception
javax.servlet.ServletException: Wrapper cannot find servlet class com.servlet.servlet.RegServlet or a class it depends onorg.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.RegServletorg.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:
The above problem still occurs when the servlet class is correctly written and the configuration file is correct:
Preparation: Check whether the. class file is properly generated under the \ WEB-INF \ classes directory, if not generated, continue to the next step
Step 1: Clear project-> clean project
Step 2: Clear tomcat cache-> directory files of the corresponding project under the corresponding directory \ work \ Catalina \ localhost
Step 3: re-release the project