org.springframework.web.context

## Interface ServletContextAware

- All Superinterfaces:
    Aware
  All Known Implementing Classes:
    AbstractAtomFeedView, AbstractCachingViewResolver, AbstractController, AbstractControllerUrlHandlerMapping, AbstractDetectingUrlHandlerMapping, AbstractExcelView, AbstractFeedView, AbstractHandlerMapping, AbstractHandlerMethodAdapter, AbstractHandlerMethodMapping, AbstractJasperReportsSingleFormatView, AbstractJasperReportsView, AbstractJExcelView, AbstractPdfStamperView, AbstractPdfView, AbstractRequestLoggingFilter, AbstractRssFeedView, AbstractTemplateView, AbstractTemplateViewResolver, AbstractUrlBasedView, AbstractUrlHandlerMapping, AbstractUrlViewController, AbstractView, AnnotationMethodHandlerAdapter, BeanNameUrlHandlerMapping, BeanNameViewResolver, CharacterEncodingFilter, CommonsMultipartResolver, CommonsRequestLoggingFilter, ConfigurableJasperReportsView, ContentNegotiatingViewResolver, ContentNegotiationManagerFactoryBean, 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, ServletContextParameterFactoryBean, ServletContextPropertyPlaceholderConfigurer, ServletContextRequestLoggingFilter, ServletForwardingController, ServletServerContainerFactoryBean, ServletWrappingController, ShallowEtagHeaderFilter, SimpleServletPostProcessor, SimpleUrlHandlerMapping, TilesConfigurer, TilesConfigurer, TilesView, TilesView, TilesViewResolver, 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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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
      See Also:
        `InitializingBean.afterPropertiesSet()`, `ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)`