Possible Duplicate:
How to redirect to another page when already authenticated user accesses login page
If a logged in user clicks on login.jsp page then he should be automatically redirected to his home.jsp. Before authentication user goes to login.jsp and after successfully authenticated by a servlet (doPost) he is redirected to home.jsp, but when again the same user clicks on login page then he should be automatically redirected to home.jsp instead of logging again. How can I do it in JSP/Servlet? I am setting session from that servlet after successfully authenticated.
Before login, user clicks on login.jsp and goes to doPost() method of servlet and goes to home.jsp. After logged in succesfully, if user clicks again on login.jsp then instead of going to login.jsp, control should go directly to home.jsp. How can I do it?
If user is signed out then only after clicking login.jsp control will go to login.jsp and then doPost() of servlet and finally home.jsp will come.