请问,这错误找不到了
出现这样错误
HTTP Status 404 - There is no Action mapped for namespace / and action name LoginAction.
type Status report
message There is no Action mapped for namespace / and action name LoginAction.
description The requested resource (There is no Action mapped for namespace / and action name LoginAction.) is not available.
代码:
<form action="LoginAction.action" method="post">
用户名:<input type="text" name="username">
密码:<input type="password" name="password">
<input type="submit" value="提交"/>
</form>
<package name="default" extends="struts-default">
<action name="LoginAction" method="login" class="com.xaccp.Action.LoginAction">
<result>/success.jsp</result>
</action>
</package>
public class LoginAction extends ActionSupport {
private String username;
private String password;
public String login(){
System.out.println(username);
return SUCCESS;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
求解