谢谢:
警告:
告: 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>

解决方案 »

  1.   

    啊?? <s:form  action="login.action" method="post" namespace="/"> 
    <s:form />有 namespace属性吗?
    你把它改成  
    <s:form  action="/login.action" method="post"> 试一下,我知道的只有这种方法。
      

  2.   

    你的struts配置文件中的form属性呢?
      

  3.   

    把<s:form  action="login.action" method="post" namespace="/"> 中的action标签部分修改为:
     action="login" 试试吧 ! 我遇到同样的问题就是这样解决的。