org.springframework.web.context
Interface ServletContextAware

All Known Implementing Classes:
AbstractRequestLoggingFilter, CharacterEncodingFilter, CommonsMultipartResolver, CommonsRequestLoggingFilter, CosMultipartResolver, DelegatingFilterProxy, GenericFilterBean, Log4jNestedDiagnosticContextFilter, MultipartFilter, OncePerRequestFilter, OpenPersistenceManagerInViewFilter, OpenSessionInViewFilter, OpenSessionInViewFilter, ServletContextAttributeExporter, ServletContextAttributeFactoryBean, ServletContextFactoryBean, ServletContextParameterFactoryBean, ServletContextPropertyPlaceholderConfigurer, ServletContextRequestLoggingFilter, SimpleServletPostProcessor

public interface ServletContextAware

Interface to be implemented by any object that wishes to be notified of the ServletContext (typically determined by the WebApplicationContext) that it runs in.

Can be implemented instead of ApplicationContextAware (casting the context to WebApplicationContext) if all an object needs is a reference to the ServletContext.

Since:
12.03.2004
Author:
Juergen Hoeller
See Also:
ApplicationContextAware

Method Summary
 void setServletContext(ServletContext servletContext)
          Set the ServletContext that this object runs in.
 

Method Detail

setServletContext

void setServletContext(ServletContext servletContext)
Set the ServletContext that this object runs in.

Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked after ApplicationContextAware's setApplicationContext.

Parameters:
servletContext - ServletContext object to be used by this object


Copyright (c) 2002-2006 The Spring Framework Project.