package com.login.action;
import java.util.Map;
import org.apache.struts2.ServletActionContext;
import com.common.Constants;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class UserLogoutAction extends ActionSupport{
private static final long serialVersionUID = 1L;
@SuppressWarnings("unchecked")
public String execute(){
Map session = ActionContext.getContext().getSession();
session.remove("user");
session.remove("lastLoginDate");
session.remove(Constants.CURRENT_USER);
session.remove("error");
session.remove("successMessage");
//ServletActionContext.getRequest().getSession().invalidate();
//ServletActionContext.getResponse().setHeader("Refresh", ".05");
session.clear();
return SUCCESS;
}
}