Example usage for javax.servlet FilterConfig getServletContext

List of usage examples for javax.servlet FilterConfig getServletContext

Introduction

In this page you can find the example usage for javax.servlet FilterConfig getServletContext.

Prototype

public ServletContext getServletContext();

Source Link

Document

Returns a reference to the ServletContext in which the caller is executing.

Usage

From source file:edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.java

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    ctx = filterConfig.getServletContext();
    ss = StartupStatus.getBean(ctx);//from  w  ww  .j  av  a  2 s. co m
    statusAlreadyDisplayed = false;
}

From source file:org.codelabor.system.filters.BaseFilterImpl.java

public void init(FilterConfig filterConfig) throws ServletException {
    if (log.isDebugEnabled()) {
        log.debug("init()");
    }//w  w w  .  j  a  v a  2 s  . co m
    this.servletContext = filterConfig.getServletContext();
}

From source file:cs544.wamp_blog_engine.filters.MyFilter.java

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    WebApplicationContext context = WebApplicationContextUtils
            .getWebApplicationContext(filterConfig.getServletContext());
    userService = context.getBean("userService", IUserService.class);
}

From source file:org.wte4j.ui.server.filters.SessionContextFilter.java

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    serviceContext = WebApplicationContextUtils
            .getRequiredWebApplicationContext(filterConfig.getServletContext()).getBean(ServiceContext.class);
}

From source file:com.parleys.server.frontend.web.ipad.filters.LoginFilter.java

@Override
public void init(FilterConfig filterConfig) {
    applicationContext = WebApplicationContextUtils
            .getRequiredWebApplicationContext(filterConfig.getServletContext());
}

From source file:net.roecky.grails.plugins.shiroProtectAny.filters.ShiroAnyUrlProtectionFilter.java

public void init(final FilterConfig filterConfig) throws ServletException {
    // resolve the service bean
    ApplicationContext context = (ApplicationContext) filterConfig.getServletContext()
            .getAttribute(GrailsApplicationAttributes.APPLICATION_CONTEXT);
    shiroAnyUrlProtection = context.getBean("shiroAnyUrlProtectionService", ShiroAnyUrlProtectionService.class);
}

From source file:org.italiangrid.storm.webdav.server.MiltonFilter.java

@Override
public void init(FilterConfig config) throws ServletException {

    servletContext = config.getServletContext();
    initMiltonHTTPManager(servletContext);

}

From source file:com.thoughtworks.go.server.web.ConfigValidityFilter.java

public void init(FilterConfig config) {
    WebApplicationContext appContext = WebApplicationContextUtils
            .getWebApplicationContext(config.getServletContext());
    if (this.licenseInterceptor == null) {
        GoLicenseService licenseService = (GoLicenseService) appContext.getBean("goLicenseService");
        licenseInterceptor = new LicenseInterceptor(licenseService);
    }//from w  ww  .  ja  v a 2s . c  om
    logRequestTimings = new SystemEnvironment().getEnableRequestTimeLogging();
}

From source file:org.midonet.api.auth.LoginFilter.java

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    log.debug("LoginFilter.init: entered.");
    servletContext = filterConfig.getServletContext();
}

From source file:com.oak_yoga_studio.filters.MyFilter.java

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    WebApplicationContext context = WebApplicationContextUtils
            .getWebApplicationContext(filterConfig.getServletContext());
    userService = context.getBean("customerService", ICustomerService.class);
}