FileDocCategorySizeDatePackage
JasperListener.javaAPI DocApache Tomcat 6.0.142549Fri Jul 20 04:20:34 BST 2007org.apache.catalina.core

JasperListener

public class JasperListener extends Object implements org.apache.catalina.LifecycleListener
This listener is designed to initialize Jasper before any web applications are started.
author
Remy Maucherat
version
$Revision: 491990 $ $Date: 2007-01-03 01:36:57 +0100 (mer., 03 janv. 2007) $
since
4.1

Fields Summary
private static org.apache.juli.logging.Log
log
protected org.apache.catalina.util.StringManager
sm
The string manager for this package.
Constructors Summary
Methods Summary
public voidlifecycleEvent(org.apache.catalina.LifecycleEvent event)
Primary entry point for startup and shutdown events.

param
event The event that has occurred



    // ---------------------------------------------- LifecycleListener Methods


                        
        

        if (Lifecycle.INIT_EVENT.equals(event.getType())) {
            try {
                // Set JSP factory
                Class.forName("org.apache.jasper.compiler.JspRuntimeContext",
                              true,
                              this.getClass().getClassLoader());
            } catch (Throwable t) {
                // Should not occur, obviously
                log.warn("Couldn't initialize Jasper", t);
            }
            // Another possibility is to do directly:
            // JspFactory.setDefaultFactory(new JspFactoryImpl());
        }