content: package egovframework.com.sec.security.filter;
  
  import java.io.IOException;
  
  import javax.servlet.Filter;
  import javax.servlet.FilterChain;
  import javax.servlet.FilterConfig;
  import javax.servlet.ServletException;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  
  /**
   *
   * @author ahnshy
   * @since 2011. 8. 29.
   * @version 1.0
   */
  
  public class EgovSpringSecurityLogoutFilter implements Filter{
  
  	@SuppressWarnings("unused")
  	private FilterConfig config;
  
  	private static final Logger LOGGER = LoggerFactory.getLogger(EgovSpringSecurityLogoutFilter.class);    
  
  	public void destroy() {}
  
  
  	public void doFilter(ServletRequest request, ServletResponse response,
  			FilterChain chain) throws IOException, ServletException {
  
  		String requestURL = ((HttpServletRequest)request).getRequestURI();
  		LOGGER.debug(requestURL);
  
  		((HttpServletRequest)request).getSession().setAttribute("loginVO", null);
  		((HttpServletResponse)response).sendRedirect(((HttpServletRequest)request).getContextPath() + "/egov_security_logout");
  
  	}
  
  	public void init(FilterConfig filterConfig) throws ServletException {
  
  		this.config = filterConfig;
  
  	}
  }
  