Hello everyone!!
I am new on this forums and also a newbie on JSP.
I am trying to create a login.jsp that works with 2 javabeans with the next procedure:
1) Get username and password in login.jsp
2) In a bean called loginuser.java make a query in MySQL to find if the username is in the table.
3) If there are any data compare passwords, if they match allow access to other page, if not, resend user to login.jsp.
I understand now how to make the comparation but I still don't catch how to resend the user to the respective pages.
Here is the code that is giving me the puzzle:
if (userValidate==true && passValidate==true){
response.sendRedirect("loginsuccess.jsp");
}
else {
response.sendRedirect("loginfails.jsp");
It supossed that loginfails is a temporal page that redirect the user to login.jsp before that tell the user that the data he/she sends is incorrect.
I don't know with this information is enough to ask, thanks anyway for the help.
Travsam