`
Jerrick
  • 浏览: 19359 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类

警告: 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="/">即可。

0
2
分享到:
评论
2 楼 Jerrick 2011-11-30  
kalin 写道
<s:form action="Login" namespace="\">斜杠写反了。。。应是namespace="/"

啊,确实。谢谢指正啊,大意了
1 楼 kalin 2011-11-26  
<s:form action="Login" namespace="\">斜杠写反了。。。应是namespace="/"

相关推荐

Global site tag (gtag.js) - Google Analytics