HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.struts.action.ActionServlet or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
java.lang.Thread.run(Unknown Source)
root cause
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
java.lang.Thread.run(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
HTML code
<?xml version="1.0" encoding="UTF-8"?> <web-app> <servlet> <servlet-name>actionServlet</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>actionServlet</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> </web-app>
HTML code
<?xml version="1.0" encoding="UTF-8"?> <struts-config> <form-beans> <form-bean name="formBean1" type="classmate.UserForm"/> </form-beans> <global-forwards> <forward name="failed" path="/error.jsp"/> <froward name="successed" path="/right.jsp"/> </global-forwards> <action-mappings> <action path="/login" type="classmate.LoginAction" name="formBean1" scope="request" input="/login.jsp" /> <action path="/regist" forward="/regist.jsp" /> </action-mappings> </struts-config><?xml version="1.0" encoding="UTF-8"?> <struts-config> <form-beans> <form-bean name="formBean1" type="classmate.UserForm"/> </form-beans> <global-forwards> <forward name="failed" path="/error.jsp"/> <froward name="successed" path="/right.jsp"/> </global-forwards> <action-mappings> <action path="/login" type="classmate.LoginAction" name="formBean1" scope="request" input="/login.jsp" /> <action path="/regist" forward="/regist.jsp" /> </action-mappings> </struts-config>
说明:我确实把struts.jar包通过eclipse引入了,但它怎么提示找不到ActionServlet呢?