STRUTS.xml的配置如下, 报错There is no Action mapped for namespace [/]
struts.xml内容如下:<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSof...
struts.xml内容如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="struts2" extends="struts-default">
<action name="login" class="test.LoginAction">
<result name="SUCCESS" type="redirect">/index.jsp</result>
<result name="input">/login.jsp</result>
<result name="ERROR">/login.jsp</result>
</action>
</package>
</struts>
报错
2013-5-8 13:08:05 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Exception occurred during processing request: There is no Action mapped for namespace [/] and action name [login] associated with context path [/xuanke].
There is no Action mapped for namespace [/] and action name [login] associated with context path [/xuanke]. - [unknown location]
项目结构如图 展开
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="struts2" extends="struts-default">
<action name="login" class="test.LoginAction">
<result name="SUCCESS" type="redirect">/index.jsp</result>
<result name="input">/login.jsp</result>
<result name="ERROR">/login.jsp</result>
</action>
</package>
</struts>
报错
2013-5-8 13:08:05 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Exception occurred during processing request: There is no Action mapped for namespace [/] and action name [login] associated with context path [/xuanke].
There is no Action mapped for namespace [/] and action name [login] associated with context path [/xuanke]. - [unknown location]
项目结构如图 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询