1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| package fac.actions;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.Query;
import net.sf.hibernate.Session;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.taglib.html.ResetTag;
import fac.metier.Users;
import fac.metier.base.HibernateUtil;
public class ConnexionActionForm extends ActionForm
{
private static final long serialVersionUID = 9100914760156326337L;
private String login = null;
private String password = null;
public String getLogin() {
return this.login;
}
public void setLogin(String login) {
this.login = login;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.login = null;
this.password = null;
System.out.println("reset");
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
System.out.println("validate");
ActionErrors errors = new ActionErrors();
return errors;
/*try
{
return userConnection(request);
}
catch (HibernateException e) {
e.printStackTrace();
return null;
}*/
} |
Partager