HTTP Status 500 问题,感谢回答

HTTP Status 500 - Error instantiating servlet class servlet.HelloServlet

type Exception report

message Error instantiating servlet class servlet.HelloServlet

description The server encountered an internal error that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: Error instantiating servlet class servlet.HelloServlet
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)

root cause
java.lang.ClassNotFoundException: servlet.HelloServlet
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1907)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1750)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)

一月 31, 2018 3:32:31 下午 org.apache.catalina.core.ApplicationContext log

信息: Marking servlet HelloServlet as unavailable
一月 31, 2018 3:32:31 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet HelloServlet
java.lang.ClassNotFoundException: servlet.HelloServlet
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1907)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1750)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:534)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:516)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:148)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1133)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:853)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

有大佬帮忙解决一下这个问题么,刚开始接触Servlet不是太了解

11个回答

你的HelloServlet类未找到,检查web.xml文件中是否类完全限定名写错了。

qq_35833374
Dejounte 回复sinat_35627519: 谢谢
2 年多之前 回复

你的web.xml中没有配置好Servlet的路径的。映射出现了问题

web.xml中Servlet的路径的映射出现了问题

web.xml的问题

在web.xml中需要配置HelloServlet如:

HelloServlet
com.xx.xx.HelloServlet


HelloServlet
/HelloServlet

你的路径配置正确或者没有写这个配置

RequestInfo

你的RequestInfo类的全限定名就是RequestInfo吗?就是你该类的package 后面的复制到中再加上你的类名,其次你的tomcat,server.xml文件中是配置的webapps/myapp
路径吗?

helloservlet 路劲都没搞订

图片说明,报的500的错,一看就是servlet的路径配置错了,在web.xml里配置的,通过映射找不到这个类

qq_35833374
Dejounte 回复南丐: 谢谢
2 年多之前 回复

没有找到相对应的类,提示500错误

weixin_43935591
JUST DO ITY 那该怎么办呢,按CTRL把鼠标放上去是能定位到该类的啊
大约一年之前 回复
qq_35833374
Dejounte 回复强仔儿: 谢谢
2 年多之前 回复
qq_35833374
Dejounte 回复强仔儿: 谢谢
2 年多之前 回复

检查环境变更的配置,或者引入的jar包问题

qq_35833374
Dejounte 回复wjlwjlwjlwjl: 谢谢
2 年多之前 回复
共11条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐