WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

examples.servlets.lifecycle
Class LifeCycleListener

java.lang.Object
  |
  +--examples.servlets.lifecycle.LifeCycleListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class LifeCycleListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

LifeCycleListener is a servlet listener class that implements the javax.servlet.ServletContextListener interface. This class simply implements the contextDestroyed and contextInitialized methods to log the calls of them to standard out. These methods are called when the Web Application is deployed and undeployed on the WebLogic Server.

Author:
Copyright (c) 2002 by BEA Systems, Inc. All Rights Reserved.

Constructor Summary
LifeCycleListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent evt)
          log the call of contextDestroyed.
 void contextInitialized(javax.servlet.ServletContextEvent evt)
          log the call of contextInitialized.
(package private) static void log(java.lang.String s)
          log method to prepend all messages from this class with [LifeCycleListener]
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifeCycleListener

public LifeCycleListener()
Method Detail

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent evt)
log the call of contextDestroyed.
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent evt)
log the call of contextInitialized.
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

log

static void log(java.lang.String s)
log method to prepend all messages from this class with [LifeCycleListener]

Documentation is available at
http://e-docs.bea.com/wls/docs70

Copyright © 2002 BEA Systems, Inc. All Rights Reserved.