"No action config found for the specified url"的错误
貌似很简单,我这里死活调不好。
查来查去都是因为struts-config.xml里边的path没有配好。
但是我感觉没有错呀
struts-config.xml内
------------------------------------------------
<form-beans>
<form-bean name="loginForm" type="com.yu.bbs.actionform.TestActionForm">
</form-bean>
</form-beans>
<global-forwards>
</global-forwards>
<action-mappings>
<action path="/login"
type="com.yu.bbs.action.LoginAction"
name="loginForm"
scope="request">
<forward name="success" path="/ls.jsp"></forward>
<forward name="fail" path="/f.jsp"></forward>
</action>
</action-mappings>
--------------------------------------------------------------
代码内的类是
com.yu.bbs.action包内的
LoginAction.java类
com.yu.bbs.actionform包内的
TestActionForm.java类
---------------------------
项目名称是BBS,在tomcat下能找到BBS这个路径,但是点击之后,就会出现(如果是小写bbs就出现404错误)
浏览器地址[http://localhost:8081/BBS/]
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: No action config found for the specified url.
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.
org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.23
谢谢高手帮忙看看,怎么回事?