i have to design a login page.
what i am doing is, i have designed:
login.jsp:- has the login form.
loginCheck.java:- taking the text field values, and creating object of class authenticate.java and calling the authentication method of authenticate class, and redirecting to the appropriate page based on (login is correct or incorrect).
Authenticate.java:- has the method to authenticate user.
but What i want is when user login with invalid id and password, it should redirect to login.jsp with
an error message
if i use only
jsp pages, i can do this something like this:
In my login.jsp
In my loginCheck.jsp
but the problem is for checking user authentication, i am not using jsp, but using
servlet, so how can i do the same thing in servlet??