警告: No configuration found for the specified action: 'login.action' in namespace: '/'. Form action d
谢谢:
警告:
告: No configuration found for the specified action: 'login.action' in namespace: '/'. Form action defaulting to 'action' attribute's literal value.
2004-3-20 20:27:04 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'login.action' in namespace: '/'. Form action defaulting to 'action' attribute's literal value.struts2.xml
<struts>
<package name="com.text.action" extends="struts-default" namespace="/">
<action name="login" class="com.test.action.LoginAction" method="login">
<result name="input">/login2.jsp</result>
<result name="success">/result.jsp</result>
<result name="failer">/login2.jsp</result>
</action>
</package>
</struts> login2.jsp
<body>
<s:form action="login.action" method="post" namespace="/">
<s:textarea name="username" label="username"></s:textarea>
<s:password name="password" label="password"></s:password>
<s:submit label="submit"></s:submit>
</s:form>
</body> web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
警告:
告: No configuration found for the specified action: 'login.action' in namespace: '/'. Form action defaulting to 'action' attribute's literal value.
2004-3-20 20:27:04 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'login.action' in namespace: '/'. Form action defaulting to 'action' attribute's literal value.struts2.xml
<struts>
<package name="com.text.action" extends="struts-default" namespace="/">
<action name="login" class="com.test.action.LoginAction" method="login">
<result name="input">/login2.jsp</result>
<result name="success">/result.jsp</result>
<result name="failer">/login2.jsp</result>
</action>
</package>
</struts> login2.jsp
<body>
<s:form action="login.action" method="post" namespace="/">
<s:textarea name="username" label="username"></s:textarea>
<s:password name="password" label="password"></s:password>
<s:submit label="submit"></s:submit>
</s:form>
</body> web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<s:form />有 namespace属性吗?
你把它改成
<s:form action="/login.action" method="post"> 试一下,我知道的只有这种方法。
action="login" 试试吧 ! 我遇到同样的问题就是这样解决的。