com.sptci.echo2.http
Class LogoutServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.sptci.echo2.http.LogoutServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class LogoutServlet
extends HttpServlet

A servlet used to implement logout feature for Echo2 applications. Invalidates the user session and redirects the user to a page configured as a init-param for the servlet.

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: LogoutServlet.java 3217 2007-05-07 11:06:01Z rakesh $
Author:
Rakesh Vidyadharan 2006-06-25
See Also:
Serialized Form

Field Summary
private  String url
          The path to which the user should be redirected to after logging out of the current session.
private static String URL_PARAM
          The name of the servlet init-param that holds the value of url.
 
Constructor Summary
LogoutServlet()
           
 
Method Summary
 void init()
          Initialise this servlet instance.
protected  void invalidate(HttpServletRequest request)
          Invalidate the current HTTP session and display a standard page that lets the user restart a new session.
protected  void service(HttpServletRequest request, HttpServletResponse response)
          Process HTTP requests.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_PARAM

private static final String URL_PARAM
The name of the servlet init-param that holds the value of url.

See Also:
Constant Field Values

url

private String url
The path to which the user should be redirected to after logging out of the current session.

Constructor Detail

LogoutServlet

public LogoutServlet()
Method Detail

init

public void init()
Initialise this servlet instance.

Overrides:
init in class GenericServlet

service

protected void service(HttpServletRequest request,
                       HttpServletResponse response)
                throws ServletException,
                       IOException
Process HTTP requests.

Overrides:
service in class HttpServlet
Throws:
ServletException
IOException
See Also:
invalidate(javax.servlet.http.HttpServletRequest)

invalidate

protected void invalidate(HttpServletRequest request)
Invalidate the current HTTP session and display a standard page that lets the user restart a new session.