2 qq 35373966 qq_35373966 于 2018.02.14 23:11 提问

No result defined for action xxx and result xxx 5C

No result defined for action com.action.LoginAction and result success

LoginAction.java
package com.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.dao.UserDao;
import com.model.User;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LoginAction extends ActionSupport{
private static final long serialVersionUID = 1L;

private String id;
private String pwd;

public String getId() {
    return id;
}

public void setId(String id) {
    this.id = id;
}

public String getPwd() {
    return pwd;
}

public void setPwd(String pwd) {
    this.pwd = pwd;
}

public String execute() throws Exception {
    // TODO Auto-generated method stub
    return ERROR;
}
}

struts.xml
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd">



/index.jsp
/userlogin.jsp


表单:

登录



    <input type="password" id="pwd" placeholder="Password" required/>
</fieldset>
<fieldset id="actions">
    <input type="submit" id="submit" value="登 录"/>
    <a href="">忘记密码?</a><a href="">Register</a>
</fieldset>

/s:form

1个回答

caozhy
caozhy   Ds   Rxr 2018.02.14 23:38
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!