public class Contact {
private String userName;
private String passWord;
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 class CustomerProfile {
private String firsName;
private String lastName;
private String billAddress;
private String contactPh;
private String emailID;
public String getFirsName() {
return firsName;
}
public void setFirsName(String firsName) {
this.firsName = firsName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getBillAddress() {
return billAddress;
}
public void setBillAddress(String billAddress) {
this.billAddress = billAddress;
}
public String getContactPh() {
return contactPh;
}
public void setContactPh(String contactPh) {
this.contactPh = contactPh;
}
public String getEmailID() {
return emailID;
}
public void setEmailID(String emailID) {
this.emailID = emailID;
}
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String userName=req.getParameter("userName");
String passWord=req.getParameter("passWord");
ICustomerService logincheck=new CustomerService();
boolean result= logincheck.checkValidCustomer(userName, passWord);
if(result==true){
resp.sendRedirect("success.jsp");
req.getSession().setAttribute("userName", userName);
}else{
resp.sendRedirect("login.jsp");
}
}