警告: No configuration found for the specified action: 'Login' in namespace: '

2011-5-6 10:15:59 com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
警告: No configuration found for the specified action: 'Login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2011-5-6 10:15:59 com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
警告: No configuration found for the specified action: 'Login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.

 

--commom中的header.jsp中登录

<font color="red">${result}</font>
        <s:form action="Login">
         <s:textfield label="用户名" name="userName"></s:textfield>
         <s:password label="密码" name="password"></s:password>
         <s:submit value="登录"></s:submit>
</s:form>
---struts.xml中的配置

<package name="default" namespace="/" extends="struts-default">
  <action name="Login" class="org.CollegePro.ssh.web.action.Login" method="login">
   <result name="input">/index.jsp</result>
   <result name="error">/error.jsp</result>
  </action>
 </package>

 

我在struts中配置了namespace="/",但是在s:form中没有配置namespace,所以运行就出现了2011-5-6 10:15:59 com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
警告: No configuration found for the specified action: 'Login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.

 

解决办法就是在s:form中添加namespace="/"  <s:form action="Login" namespace="/">即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值