I feel your question is not clear. From what i understood i feel it's quite simple. What you need is 1 login form(login.htm/login.jsp). After login say in between some processing you have a logout button which submits the form to some url like /Logout. In the servlet which has been mapped to this url just do 2 things. (1) invalidating/ destoying the session, & (2) redirecting the user to login screen using either response.sendRedirect("./login.htm") or RequestDispatcher.forward() methods. I think this can resolve your problem.
|