public void doLogout(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        if (!common.checkPost(request, response)) return;
        request.getSession().removeAttribute("logged-in-username");
        response.sendRedirect("/");
    }
public void doLogout ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { if ( ! common . checkPost ( request , response ) ) return ; request . getSession ( ) . removeAttribute ( "logged-in-username" ) ; response . sendRedirect ( "/" ) ; }
Logout form handler.