Spring Framework

org.springframework.web.context
Interface ServletContextAware

All Superinterfaces:
Aware
All Known Implementing Classes:
AbstractAtomFeedView, AbstractCachingViewResolver, AbstractCommandController, AbstractController, AbstractControllerUrlHandlerMapping, AbstractDetectingUrlHandlerMapping, AbstractExcelView, AbstractFeedView, AbstractFormController, AbstractHandlerMapping, AbstractHandlerMethodAdapter, AbstractHandlerMethodMapping, AbstractJasperReportsSingleFormatView, AbstractJasperReportsView, AbstractJExcelView, AbstractPdfStamperView, AbstractPdfView, AbstractRequestLoggingFilter, AbstractRssFeedView, AbstractTemplateView, AbstractTemplateViewResolver, AbstractUrlBasedView, AbstractUrlHandlerMapping, AbstractUrlViewController, AbstractView, AbstractWizardFormController, AbstractXsltView, AnnotationMethodHandlerAdapter, BaseCommandController, BeanNameUrlHandlerMapping, BeanNameViewResolver, CancellableFormController, CharacterEncodingFilter, CommonsMultipartResolver, CommonsRequestLoggingFilter, ConfigurableJasperReportsView, ContentNegotiatingViewResolver, ControllerBeanNameHandlerMapping, ControllerClassNameHandlerMapping, DefaultAnnotationHandlerMapping, DefaultServletHttpRequestHandler, DelegatingFilterProxy, DelegatingWebMvcConfiguration, FreeMarkerConfigurer, FreeMarkerView, FreeMarkerViewResolver, GenericFilterBean, HiddenHttpMethodFilter, HttpPutFormContentFilter, InternalResourceView, InternalResourceViewResolver, JasperReportsCsvView, JasperReportsHtmlView, JasperReportsMultiFormatView, JasperReportsPdfView, JasperReportsViewResolver, JasperReportsXlsView, JstlView, Log4jNestedDiagnosticContextFilter, MappingJackson2JsonView, MappingJacksonJsonView, MarshallingView, MultiActionController, MultipartFilter, OncePerRequestFilter, OpenEntityManagerInViewFilter, OpenPersistenceManagerInViewFilter, OpenSessionInViewFilter, OpenSessionInViewFilter, ParameterizableViewController, RedirectView, RequestContextFilter, RequestMappingHandlerAdapter, RequestMappingHandlerMapping, RequestMappingInfoHandlerMapping, ResourceBundleViewResolver, ResourceHttpRequestHandler, ServletContextAttributeExporter, ServletContextAttributeFactoryBean, ServletContextFactoryBean, ServletContextParameterFactoryBean, ServletContextPropertyPlaceholderConfigurer, ServletContextRequestLoggingFilter, ServletForwardingController, ServletWrappingController, ShallowEtagHeaderFilter, SimpleFormController, SimpleServletPostProcessor, SimpleUrlHandlerMapping, TilesConfigurer, TilesConfigurer, TilesJstlView, TilesView, TilesView, TilesViewResolver, UrlBasedViewResolver, UrlFilenameViewController, VelocityConfigurer, VelocityLayoutView, VelocityLayoutViewResolver, VelocityToolboxView, VelocityView, VelocityViewResolver, WebApplicationObjectSupport, WebContentGenerator, WebContentInterceptor, WebMvcConfigurationSupport, XmlViewResolver, XsltView, XsltViewResolver

public interface ServletContextAware
extends Aware

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

Since:
12.03.2004
Author:
Juergen Hoeller, Chris Beams
See Also:
ServletConfigAware

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

Method Detail

setServletContext

void setServletContext(javax.servlet.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
See Also:
InitializingBean.afterPropertiesSet(), ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)

Spring Framework