package com.gaowj.system.login;

//import java.util.List;
//import java.util.Map;

import java.io.IOException;

import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
//import com.gaowj.business.listener.myHttpSessionAttributeListener;
import com.gaowj.business.util.SessionUtil;


public class LogoutAction  extends BasicAction {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6074460857486096013L;

	public String execute() throws BusinessException {
//		request.getSession().removeAttribute("userInfo");
//		List<Map<String,Object>> user = myHttpSessionAttributeListener.getSessionUser(request);
//		   System.out.println("在线用户");
//		   System.out.println(user);
		SessionUtil.removeSession(request);
		request.getSession().invalidate();
		try {
			response.sendRedirect("login");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;

	}
}
