FileDocCategorySizeDatePackage
LogFilter.javaAPI DocExample779Thu Apr 05 20:40:56 BST 2001None

LogFilter

public class LogFilter extends Object implements Filter

Fields Summary
FilterConfig
config
Constructors Summary
Methods Summary
public voiddoFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)

    ServletContext context = getFilterConfig().getServletContext();
    long bef = System.currentTimeMillis();
    chain.doFilter(req, res); // no chain parameter needed here
    long aft = System.currentTimeMillis();
    context.log("Request to " + req.getRequestURI() + ": " +
                                                     (aft-bef));
  
public javax.servlet.FilterConfiggetFilterConfig()

    return config;
  
public voidsetFilterConfig(javax.servlet.FilterConfig config)

    this.config = config;