Top Description Methods
org.springframework.web.context

public Interface ServletContextAware

extends Aware
Known Direct Implementers
org.springframework.web.context.support.ServletContextAttributeExporter, org.springframework.web.context.support.ServletContextAttributeFactoryBean, org.springframework.web.context.support.ServletContextParameterFactoryBean, org.springframework.web.context.support.WebApplicationObjectSupport, org.springframework.web.filter.GenericFilterBean, org.springframework.web.accept.ContentNegotiationManagerFactoryBean
Imports
jakarta.servlet.ServletContext, org.springframework.beans.factory.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.
Authors
Juergen Hoeller, Chris Beams
Since
12.03.2004
See Also
ServletConfigAware

Method Summary

Modifier and TypeMethod and Description
public void
setServletContext(ServletContext
the ServletContext object to be used by this object
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.

Method Detail

setServletContextback to summary
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

the ServletContext object to be used by this object

See Also
org.springframework.beans.factory.InitializingBean#afterPropertiesSet, org.springframework.context.ApplicationContextAware#setApplicationContext