I am new to java. Here I am making my first web project, i have login.jsp and servlet(doPost) for authentication and then redirects to userhome if authenticated. But if not authenticated then a message is going like:
response.sendRedirect("login.jsp?msg=Invalid user id and password");
But this message is being displayed in browser header like :
login.jsp?msg=Invalid user id and password
which i do not want. In browser no message should be displayed and should only display the url of login page(login.jsp) when user is not authenticated that is:
login.jsp
Any help?
Edit: try this code. use session object.
in login.jsp use this code