/*logout servlet*/
import java.io.*;	
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
import java.util.*;
import java.util.Date;

/**
 * Control passes to the doGet method of this class whenever user clicks on logout link. All sessions are invalidated.
 * @author      Nilesh Agarwal
 * @version     1.00, 09/10/2001
 */ 


public class LogoutServlet extends HttpServlet
{ 
    public HttpSession session;

    /**
     * This method invalidates all active sessions. 
     * @param HttpServletRequest request
     * @param HttpServletResponse response
     */      

    public void doGet (HttpServletRequest request, 
		       HttpServletResponse response) 
	throws ServletException, IOException {
	PrintWriter out;
	response.setContentType("text/html");
	out=response.getWriter();
	session=request.getSession(true);
	session.invalidate();
	UserPageGenerator.logoutUser(out);
    }
}





