刚学习struts2,做到登录功能的时候登录按钮点击之后就显示action404的页面
我的工程结构是这样的
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>ieZhan</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
struts.xml
<package name="struts2" extends="struts-default" namespace="/">
<action name="login" class="com.login.struts2.loginAction">
<result name="success" type="redirect">/aboutus.jsp</result>
<result name="failer" type="redirect">/contactus.jsp</result>
</action>
</package>
jsp页面中的form代码
<s:form action="login" >
<ul class="login_cont">
<li class="f14">会员登录</li>
<li class="login_ipt"><p><span class="fl tr">账号:</span><input type="text" class="login_txt fl" name="username"/></p></li>
<li class="login_ipt"><p><span class="fl tr">密码:</span><input type="password" class="login_txt fl" name="password"/></p></li>
<li><a href="#" class="fr">忘记登录密码?</a><label><input type="checkbox" class="remember_psw" />记住密码</label></li>
<li class="mt10"><button class="login_button login_button_signup" type="submit" >登录</button></li>
</ul>
</s:form>
在启动tomcat的时候有出现警告
六月 19, 2015 3:59:32 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'loginAction' in namespace: '/pages'. Form action defaulting to 'action' attribute's literal value.
六月 19, 2015 3:59:33 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'loginAction' in namespace: '/pages'. Form action defaulting to 'action' attribute's literal value.
我看了下在页面上的action的url是
我试过加namespace=“/” 路径变成/ieZhan/login 也不行
希望有好心人帮忙解决下。