struts.xml配置提示action 错误 15
<?xmlversion="1.0"encoding="utf-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareFoundation...
<?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>
<constant name="struts.action.extension" value="php,aspx,html" />
<package name="default-package" extends="struts-default"
namespace="/">
<action name="toTestJsp" class="test.TestAction" method="testAction">
<result name="success">/testJsp.jsp</result>
<result name="input">/error.jsp</result>
</action>
<action name="Login1" class="test.loginAction1">
<result>/testJsp.jsp</result>
<result name="ERROR">/error.jsp</result>
</action>
<ACTION name="Login2" class="test.loginAction2">
<result name="SUCCESS">/success.jsp</result>
<resutl name="ERROR">/error.jsp</resutl>
</action>
</package>
<package name="test-package" extends="struts-default"
namespace="/test">
<action name="test">
<result name="success">/index.jsp</result>
</action>
</package>
</struts>
我大写的action那里报错 下面是错误提示
The content of element type "action" must match "(param|result|interceptor-ref|exception-mapping)
*". 展开
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.action.extension" value="php,aspx,html" />
<package name="default-package" extends="struts-default"
namespace="/">
<action name="toTestJsp" class="test.TestAction" method="testAction">
<result name="success">/testJsp.jsp</result>
<result name="input">/error.jsp</result>
</action>
<action name="Login1" class="test.loginAction1">
<result>/testJsp.jsp</result>
<result name="ERROR">/error.jsp</result>
</action>
<ACTION name="Login2" class="test.loginAction2">
<result name="SUCCESS">/success.jsp</result>
<resutl name="ERROR">/error.jsp</resutl>
</action>
</package>
<package name="test-package" extends="struts-default"
namespace="/test">
<action name="test">
<result name="success">/index.jsp</result>
</action>
</package>
</struts>
我大写的action那里报错 下面是错误提示
The content of element type "action" must match "(param|result|interceptor-ref|exception-mapping)
*". 展开
5个回答
展开全部
<ACTION name="Login2" class="test.loginAction2">
<result name="SUCCESS">/success.jsp</result>
<resutl name="ERROR">/error.jsp</resutl>
最后一行的result错了
看提示就应该知道是标签元素错了"(param|result|interceptor-ref|exception-mapping)表示必须有其中一个元素
<result name="SUCCESS">/success.jsp</result>
<resutl name="ERROR">/error.jsp</resutl>
最后一行的result错了
看提示就应该知道是标签元素错了"(param|result|interceptor-ref|exception-mapping)表示必须有其中一个元素
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<ACTION name="Login2" class="test.loginAction2">
<result name="SUCCESS">/success.jsp</result>
<resutl name="ERROR">/error.jsp</resutl>
最后的 result 打错了
<result name="SUCCESS">/success.jsp</result>
<resutl name="ERROR">/error.jsp</resutl>
最后的 result 打错了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
是不是对应ACTION的结束标签</action>也应该大写?
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询