欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Tomcat报错:HTTP Status 500 (Wrapper cannot find servlet class)解决办法

程序员文章站 2024-03-09 15:59:53
tomcat报错:http status 500 - wrapper cannot find servlet class http status 500 - wrappe...

tomcat报错: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 report

message wrapper cannot find servlet class com.servlet.servlet.regservlet or a class it depends on

description the 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 on
 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)

解决方案:

在确定servlet类编写正确,及配置文件正确的情况下,仍旧出现如上问题:

准备工作:查看\web-inf\classes目录下是否正常生成.class文件,如未生成,继续下一步

第一步:清空project—>  clean project

第二步:清空tomcat缓存—>  对应目录\work\catalina\localhost 下相应工程的目录文件

第三步:重新发布工程

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!