点击链接后出现500错误了!!

来源:1-3 手工编写第一个Servlet

鲜衣

2015-09-16 18:43

type Exception report

message IllegalName: servlet/HelloServlet

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

exception

java.lang.NoClassDefFoundError: IllegalName: servlet/HelloServlet
java.lang.ClassLoader.preDefineClass(ClassLoader.java:655)
java.lang.ClassLoader.defineClass(ClassLoader.java:794)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)


note The full stack trace of the root cause is available in the Apache Tomcat/7.0.40 logs.


写回答 关注

1回答

  • 鲜衣
    2015-09-16 19:12:04

    是我粗心在web.xml文件中把<class-name>中的/写成了点了。已改正。

JAVA遇见HTML——Servlet篇

本门课程在JSP课程的基础上,深入介绍Servlet的基础知识

160614 学习 · 1029 问题

查看课程

相似问题