Tomcat Error: HTTP Status (wrapper cannot find servlet Class) solution _java

Source: Internet
Author: User
Tags wrapper

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.