
//import it.inaf.ia2.aa.data.User;

import java.io.IOException;
import java.util.*; // ArrayList<String>

import java.util.logging.Logger;
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 javax.servlet.http.HttpServletRequestWrapper;
import java.security.Principal;


public class MonitorFilter implements Filter
{
  private static final Logger LOGGER = Logger.getLogger(MonitorFilter.class.getName());

   @Override
   public void init(FilterConfig fc) throws ServletException {}

   @Override
   public void destroy() {}

   @Override
   public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
                   throws IOException, ServletException
   {
        HttpServletRequest  request  = (HttpServletRequest)  req;
        HttpServletResponse response = (HttpServletResponse) res;

	LOGGER.info("before doFilter");

        chain.doFilter(request, response);
	
	LOGGER.info("after  doFilter");

   }



}

