org.springframework.web.context
Interface ServletContextAware

All Known Implementing Classes:
CommonsMultipartResolver, CosMultipartResolver, ServletContextAttributeExporter, ServletContextAttributeFactoryBean, ServletContextFactoryBean, ServletContextPropertyPlaceholderConfigurer, 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

public 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) 2003-2004 The Spring Framework Project.