No action instance for path /login could be create

严重: No action instance for path /login could be created
java.lang.ClassNotFoundException: com.gdin.struts.LoginAction
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
	at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
	at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
	at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:292)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Unknown Source)

我的问题:我遇到这个问题是因为struts-config.xml这个配置文件里面
<action path="/login"
				type="com.gdin.struts.LoginAciton"
				name="loginActionForm"
				scope="request"
		>
			<forward name="success" path="/login_success.jsp"></forward>
			<forward name="error" path="/login_error.jsp"></forward>
		</action>

type属性里面的LoginAction这个类名与实际当中我写的类名不一致而引起的,因为我在写LoginAction这个类的时候把类名敲成LoginAciton了。

你可能感兴趣的:(java,apache,tomcat,servlet,struts)