Javaweb Project JSP jump servlet Error instantiating servlet class problem

Source: Internet
Author: User



Problem:


HTTP Status 500-error instantiating servlet class Recommenderservlet


type Exception Report



message Error instantiating servlet class Recommenderservlet



Description The server encountered an internal error, prevented it from fulfilling this request.



exception


javax.servlet.ServletException: Error instantiating servlet class RecommenderServlet
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	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:1023)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	java.lang.Thread.run(Thread.java:745)





Root cause


java.lang.ClassNotFoundException: RecommenderServlet
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1714)
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1559)
org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java:502)
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:1023)
org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process (AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run (JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:615)
java.lang.Thread.run (Thread.java:745)

Solution: The problem lies in web.xml, <servlet-class> xxx </ servlet-class> should be configured as <servlet-class> package name where servlet is located. Name of servlet </ servlet>
For example: <servlet-class> cn.fth.servlet.RecommenderServlet </ servlet-class> 


Javaweb Project JSP jump servlet Error instantiating servlet class problem


Related Article

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.