package com.ferienclub.pda.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class LogoutAction extends Action {

    Logger log = Logger.getLogger(LogoutAction.class); 
	
	public ActionForward perform(ActionMapping mapping,
			 ActionForm form,
			 HttpServletRequest request,
			 HttpServletResponse response){
		System.out.println("*** Entering LogoutAction ***");
		log.info("Entering LogoutAction");
		// Just remove the user from the session ...
		request.getSession().removeAttribute("user");
		return mapping.findForward("success");
	}
	
}
