net.spy.jwebkit
Class JWServletContextListener

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.jwebkit.JWServletContextListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener
Direct Known Subclasses:
CronContextListener, ScriptSupportContextListener

public abstract class JWServletContextListener
extends net.spy.SpyObject
implements javax.servlet.ServletContextListener

Base class for servlet context listeners.


Constructor Summary
JWServletContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
protected  void ctxDestroy(javax.servlet.ServletContextEvent sce)
          Hook to override shutdown.
protected  void ctxInit(javax.servlet.ServletContextEvent sce)
          Hook to override initialization.
protected  java.lang.String getContextPath(javax.servlet.ServletContext ctx)
          Attempt to get the context path from the given context.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JWServletContextListener

public JWServletContextListener()
Method Detail

getContextPath

protected java.lang.String getContextPath(javax.servlet.ServletContext ctx)
Attempt to get the context path from the given context.

Parameters:
ctx - the servlet context
Returns:
the path, or null if we can't find it

contextInitialized

public final void contextInitialized(javax.servlet.ServletContextEvent sce)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

ctxInit

protected void ctxInit(javax.servlet.ServletContextEvent sce)
                throws java.lang.Exception
Hook to override initialization.

Parameters:
sce - the context event
Throws:
java.lang.Exception - any exception that should stop the initialization

contextDestroyed

public final void contextDestroyed(javax.servlet.ServletContextEvent sce)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

ctxDestroy

protected void ctxDestroy(javax.servlet.ServletContextEvent sce)
                   throws java.lang.Exception
Hook to override shutdown.

Parameters:
sce - the context event
Throws:
java.lang.Exception - any exception that should stop the shutdown


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.