package action;
import service.validateService;
import service.impl.loginService;
import vo.Login;
import com.opensymphony.xwork2.ActionSupport;
public class LoginAction extends ActionSupport{
private static final long serialVersionUID = 1L;
private Login login;
protected validateService vs;
public String execute() throws Exception{
Login lone= vs.validateSer(login.getUsername(),login.getPassword());
if(lone!= null){
return SUCCESS;
}
else{
return ERROR;
}
}
public void adduser(String username,String password){
vs.saveService(username, password);
}
public Login getLogin(){
return login;
}
public void setLogin(Login login){
this.login=login;
}
public validateService getValidateService(){
return vs;
}
public void setValidateService(validateService vs){
this.vs=vs;
}
}
sunbohan00
相关分类