Could not find action or result There is no Action mapped fo

Could not find action or result There is no Action mapped for namespace / and action name Login.-
用struts2做了个简单的登录界面 代码如下
struts.xml
x05
x05 x05x05
x05x05x05 /true.jsp
x05x05
x05
web.xml
x05
x05x05struts2
x05x05
x05x05x05org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
x05x05
x05x05
x05
x05x05struts2
x05x05/*
x05x05
index.jsp
Login.java
package controller;
public class Login {
x05private String username;
x05private String password;
x05public String getUsername() {
x05x05return username;
x05}
x05public void setUsername(String username) {
x05x05this.username = username;
x05}
x05public String getPassword() {
x05x05return password;
x05}
x05public void setPassword(String password) {
x05x05this.password = password;
x05}
x05public String execute(){
x05x05
x05x05return "success";x05x05
x05x05
x05}
}
傻丫头yuki 1年前 已收到3个回答 举报

至圣先师 春芽

共回答了10个问题采纳率:100% 举报

改掉.:
x05

1年前

10

傻子才悲伤0932 幼苗

共回答了22个问题 举报

错误:Could not find action or result There is no Action mapped for LoginAction类中del方法中应该这样写:return "user_del",或者struts.xml中

1年前

2

motse 幼苗

共回答了1个问题 举报

换成这个试试public class Login extends ActionSupport

1年前

1
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 18 q. 0.026 s. - webmaster@yulucn.com