Home » Spring-Framework-090522 » org.springframework » web » context » support » [javadoc | source]
org.springframework.web.context.support
public class: ServletContextFactoryBean [javadoc | source]
java.lang.Object
   org.springframework.web.context.support.ServletContextFactoryBean

All Implemented Interfaces:
    ServletContextAware, FactoryBean

Simple FactoryBean that exposes the ServletContext for bean references. Can be used as alternative to implementing the ServletContextAware callback interface. Allows for passing the ServletContext reference to a constructor argument or any custom bean property.

Note that there's a special FactoryBean for exposing a specific ServletContext attribute, named ServletContextAttributeFactoryBean. So if all you need from the ServletContext is access to a specific attribute, ServletContextAttributeFactoryBean allows you to expose a constructor argument or bean property of the attribute type, which is a preferable to a dependency on the full ServletContext.

Method from org.springframework.web.context.support.ServletContextFactoryBean Summary:
getObject,   getObjectType,   isSingleton,   setServletContext
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.web.context.support.ServletContextFactoryBean Detail:
 public Object getObject() 
 public Class getObjectType() 
 public boolean isSingleton() 
 public  void setServletContext(ServletContext servletContext)