问答详情
源自:1-3 手工编写第一个Servlet

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

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.


提问者:鲜衣 2015-09-16 18:43

个回答

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

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