01: /**
02: * $Id: PSServletContextListener.java,v 1.2 2005/07/08 03:26:34 hc109819 Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.admin.console.common;
14:
15: import javax.servlet.ServletContext;
16: import javax.servlet.ServletContextEvent;
17: import javax.servlet.ServletContextListener;
18:
19: import com.sun.portal.admin.console.PSConsoleLogManager;
20:
21: public final class PSServletContextListener implements
22: ServletContextListener {
23:
24: private static ServletContext sc = null;
25:
26: public static ServletContext getServletContext() {
27: return sc;
28: }
29:
30: public void contextInitialized(ServletContextEvent event) {
31: sc = event.getServletContext();
32: PSConsoleLogManager.init();
33: }
34:
35: public void contextDestroyed(ServletContextEvent event) {
36: sc = null;
37: PSConsoleLogManager.reset();
38: }
39:
40: }
|