/** * This method only works if you are using the {@linkplain GuiceServletContextListener} to create * your injector. Otherwise, it returns null. * * @return The current servlet context. * @since 3.0 */ protected final ServletContext getServletContext() { return GuiceFilter.getServletContext(); }
@Override public ServletContext get() { if (null != injectedServletContext) { return injectedServletContext; } Logger.getLogger(InternalServletModule.class.getName()) .warning( "You are attempting to use a deprecated API (specifically," + " attempting to @Inject ServletContext inside an eagerly created" + " singleton. While we allow this for backwards compatibility, be" + " warned that this MAY have unexpected behavior if you have more" + " than one injector (with ServletModule) running in the same JVM." + " Please consult the Guice documentation at" + " https://github.com/google/guice/wiki/Servlets for more" + " information."); return GuiceFilter.getServletContext(); } }
/** * This method only works if you are using the {@linkplain GuiceServletContextListener} to * create your injector. Otherwise, it returns null. * * @return The current servlet context. * @since 3.0 */ protected final ServletContext getServletContext() { return GuiceFilter.getServletContext(); }
/** * This method only works if you are using the {@linkplain GuiceServletContextListener} to * create your injector. Otherwise, it returns null. * * @return The current servlet context. * @since 3.0 */ protected final ServletContext getServletContext() { return GuiceFilter.getServletContext(); }
/** * This method only works if you are using the {@linkplain GuiceServletContextListener} to create * your injector. Otherwise, it returns null. * * @return The current servlet context. * @since 3.0 */ protected final ServletContext getServletContext() { return GuiceFilter.getServletContext(); }
/** * This method only works if you are using the {@linkplain GuiceServletContextListener} to create * your injector. Otherwise, it returns null. * * @return The current servlet context. * @since 3.0 */ protected final ServletContext getServletContext() { return GuiceFilter.getServletContext(); }
public ServletContext get() { return GuiceFilter.getServletContext(); }
@Override public ServletContext get() { if (null != injectedServletContext) { return injectedServletContext; } Logger.getLogger(InternalServletModule.class.getName()) .warning( "You are attempting to use a deprecated API (specifically," + " attempting to @Inject ServletContext inside an eagerly created" + " singleton. While we allow this for backwards compatibility, be" + " warned that this MAY have unexpected behavior if you have more" + " than one injector (with ServletModule) running in the same JVM." + " Please consult the Guice documentation at" + " https://github.com/google/guice/wiki/Servlets for more" + " information."); return GuiceFilter.getServletContext(); } }
public ServletContext get() { if (null != injectedServletContext) { return injectedServletContext; } Logger.getLogger(InternalServletModule.class.getName()) .warning("You are attempting to use a deprecated API (specifically," + " attempting to @Inject ServletContext inside an eagerly created" + " singleton. While we allow this for backwards compatibility, be" + " warned that this MAY have unexpected behavior if you have more" + " than one injector (with ServletModule) running in the same JVM." + " Please consult the Guice documentation at" + " http://code.google.com/p/google-guice/wiki/Servlets for more" + " information."); return GuiceFilter.getServletContext(); } }
public ServletContext get() { if (null != injectedServletContext) { return injectedServletContext; } Logger.getLogger(InternalServletModule.class.getName()) .warning("You are attempting to use a deprecated API (specifically," + " attempting to @Inject ServletContext inside an eagerly created" + " singleton. While we allow this for backwards compatibility, be" + " warned that this MAY have unexpected behavior if you have more" + " than one injector (with ServletModule) running in the same JVM." + " Please consult the Guice documentation at" + " http://code.google.com/p/google-guice/wiki/Servlets for more" + " information."); return GuiceFilter.getServletContext(); } }
@Override public ServletContext get() { if (null != injectedServletContext) { return injectedServletContext; } Logger.getLogger(InternalServletModule.class.getName()) .warning( "You are attempting to use a deprecated API (specifically," + " attempting to @Inject ServletContext inside an eagerly created" + " singleton. While we allow this for backwards compatibility, be" + " warned that this MAY have unexpected behavior if you have more" + " than one injector (with ServletModule) running in the same JVM." + " Please consult the Guice documentation at" + " https://github.com/google/guice/wiki/Servlets for more" + " information."); return GuiceFilter.getServletContext(); } }