import laogen.dto.depDto;
import com.opensymphony.xwork2.ActionSupport;
@SuppressWarnings("serial")
public class action extends ActionSupport {
private String username;//注意这里跟 index.jsp form 里面的 name 属性要对应
private String password;
private String msg;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
//然后生成 setting getting
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;
}
//自己写个方法来执行登陆
public String login() throws Exception {
Connection conn = DBcon.getConnection();// 这是用来连通数据库,记得,要下
载个驱动程序,mysql
Statement stmt = null;
ResultSet rs1 = null;
ResultSet rs2 = null;