Class LogOut
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--LogOut
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class LogOut
- extends javax.servlet.http.HttpServlet
Logs the user off the application and destroys the associated HttpSession
- See Also:
- Serialized Form
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles requests using the 'get' method by passing to the 'post' method handler. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles requests using the 'post' method. |
void |
init(javax.servlet.ServletConfig config)
Initialize the Servlet |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogOut
public LogOut()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Initialize the Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Parameters:
config
- the configuration parameters- Throws:
javax.servlet.ServletException
- a Servlet error occurred
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Handles requests using the 'get' method by passing to the 'post' method handler.
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the HttpRequestresponse
- the HttpResponse- Throws:
java.io.IOException
- an I/O error occurredjavax.servlet.ServletException
- a Servlet error occurred
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Handles requests using the 'post' method. Destroys the current session and displays a
message informing the user of the log out status in a HTML page.
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the HttpRequestresponse
- the HttpResponse- Throws:
java.io.IOException
- an I/O error occurredjavax.servlet.ServletException
- a Servlet error occurred