com.opensymphony.webwork.portlet.context
Class ServletContextHolderListener
java.lang.Object
com.opensymphony.webwork.portlet.context.ServletContextHolderListener
- All Implemented Interfaces:
- EventListener, ServletContextListener
public class ServletContextHolderListener
- extends Object
- implements ServletContextListener
Some of the factory/managers (e.g. the ObjectFactory) need access to
the ServletActionContext object when initializing.
This ServletContextListener keeps a reference to the
ServletContext and exposes it through a public static
method.
- Author:
- Nils-Helge Garli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContextHolderListener
public ServletContextHolderListener()
getServletContext
public static ServletContext getServletContext()
contextInitialized
public void contextInitialized(ServletContextEvent event)
- Stores the reference to the
ServletContext.
- Specified by:
contextInitialized in interface ServletContextListener
- See Also:
ServletContextListener.contextInitialized(javax.servlet.ServletContextEvent)
contextDestroyed
public void contextDestroyed(ServletContextEvent event)
- Specified by:
contextDestroyed in interface ServletContextListener
- See Also:
ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)
Copyright © 2007 OpenSymphony. All Rights Reserved.