FileDocCategorySizeDatePackage
LogoutAction.javaAPI DocExample1425Tue Feb 28 11:34:06 GMT 2006com.ora.jsp.servlets

LogoutAction

public class LogoutAction extends Action
This class performs the log out from the Project Billboard application.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public ActionForwardperform(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Invalidates the session, thereby removing the authentication token, and redirects to the login page.

param
mapping The ActionMapping used to select this instance
param
form The optional ActionForm bean for this request (if any)
param
request The HTTP request we are processing
param
response The HTTP response we are creating
exception
IOException if an input/output error occurs
exception
ServletException if a servlet exception occurs


	/**
	 * Invalidate the session, if any. Use false to avoid creating
	 * a new one if it has already timed out.
	 */
        HttpSession session = request.getSession(false);
	if (session != null) {
	    session.invalidate();
	}
	ActionForward nextPage = mapping.findForward("login");
        return nextPage;