com.esri.adf.web.util
Class ADFServletContextListener

java.lang.Object
  extended by com.esri.adf.web.util.ADFServletContextListener
All Implemented Interfaces:
EventListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletContextListener

public class ADFServletContextListener
extends Object
implements javax.servlet.ServletContextListener, javax.servlet.http.HttpSessionListener

The ADFServletContextListener initializes a WebApplication object and sets it as an attribute on the ServletContext.
When the ServletContext is destroyed, it destroys the associated WebApplication and attempts to clean up all server hosted objects in the current thread.
This class must be registered as a listener-class (in the web.xml file) for the web application.


Field Summary
static String APPLY_LOG_LEVEL_TO_ALL_HANDLERS_PARAM
           
static String CACHE_DIRECTORY_PARAM
           
static String LOG_LEVEL_PARAM
           
static String USER_DEFINED_XSL_FILES_TO_CACHE
          Used to specify the comma separated XSL file(s) to cache.
 
Constructor Summary
ADFServletContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Destroys the associated WebApplication and releases all server references in this thread.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Creates a WebApplication object and sets it as an attribute in this event's ServletContext.
 void sessionCreated(javax.servlet.http.HttpSessionEvent event)
           
 void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_DIRECTORY_PARAM

public static final String CACHE_DIRECTORY_PARAM
See Also:
Constant Field Values

LOG_LEVEL_PARAM

public static final String LOG_LEVEL_PARAM
See Also:
Constant Field Values

APPLY_LOG_LEVEL_TO_ALL_HANDLERS_PARAM

public static final String APPLY_LOG_LEVEL_TO_ALL_HANDLERS_PARAM
See Also:
Constant Field Values

USER_DEFINED_XSL_FILES_TO_CACHE

public static final String USER_DEFINED_XSL_FILES_TO_CACHE
Used to specify the comma separated XSL file(s) to cache.
 For Example,
   <context-param>
    <param-name>com.esri.adf.XSL_FILES</param-name>
   <param-value>
    xsl/mytask1.xsl,
   xsl/mytask2.xsl
 </param-value>
 /context-param>
 

See Also:
Constant Field Values
Constructor Detail

ADFServletContextListener

public ADFServletContextListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Creates a WebApplication object and sets it as an attribute in this event's ServletContext.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
event - the servlet context event

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Destroys the associated WebApplication and releases all server references in this thread.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
event - the servlet context event

sessionCreated

public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
Specified by:
sessionCreated in interface javax.servlet.http.HttpSessionListener

sessionDestroyed

public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
Specified by:
sessionDestroyed in interface javax.servlet.http.HttpSessionListener