Java/Spring/Web: Logout servlet example
Hi, A simple mini-post concerning a servlet to invalidate the current session when the user wants to logout. This is directly supported by the servlet api by the call to appropriate method HttpSession.invalidate() in a servlet or a controller dedicated to invalidate session. I). Server Side components First, following the codes of coordinator servlet LogoutServlet: Explanations: This class LogoutServlet implements the interface HttpRequestHandler which ...more»