org.apache.jetspeed.engine
Class JetspeedServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.jetspeed.engine.JetspeedServlet
All Implemented Interfaces:
Serializable, EventListener, javax.servlet.http.HttpSessionListener, javax.servlet.Servlet, javax.servlet.ServletConfig, org.apache.jetspeed.engine.JetspeedEngineConstants

public class JetspeedServlet
extends javax.servlet.http.HttpServlet
implements org.apache.jetspeed.engine.JetspeedEngineConstants, javax.servlet.http.HttpSessionListener

Jetspeed Servlet entry point.

Version:
$Id: JetspeedServlet.java 553340 2007-07-04 22:00:09Z taylor $
Author:
David Sean Taylor
See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log console
           
private static org.apache.jetspeed.request.RequestContextComponent contextComponent
           
private static org.apache.jetspeed.engine.Engine engine
          The Jetspeed Engine
private static boolean firstDoGet
          Should initialization activities be performed during doGet() execution?
private static boolean firstInit
          In certain situations the init() method is called more than once, somtimes even concurrently.
private static String INIT_DONE_MSG
           
private static String INIT_START_MSG
           
private static Throwable initFailure
          Whether init succeeded or not.
private static org.apache.commons.logging.Log log
           
private static String webappRoot
           
 
Fields inherited from interface org.apache.jetspeed.engine.JetspeedEngineConstants
APPLICATION_ROOT_DEFAULT, APPLICATION_ROOT_KEY, CONFIG_NAMESPACE, CONSOLE_LOGGER, DEFAULT_LOGGER, JETSPEED_PROPERTIES_DEFAULT, JETSPEED_PROPERTIES_KEY, LOG4J_CONFIG_FILE, LOG4J_CONFIG_FILE_DEFAULT, LOGGING_ROOT, LOGGING_ROOT_DEFAULT, MAIL_SERVER_KEY, PIPELINE_CLASS, PIPELINE_DEFAULT, PIPELINE_DIRECTORY, PREFERENCES_FACTORY, PREFERENCES_FACTORY_DEFAULT, SCHEDULER_LOG_FACILITY, WEB_CONTEXT, WEBAPP_ROOT_KEY
 
Constructor Summary
JetspeedServlet()
           
 
Method Summary
 void destroy()
          The Servlet destroy method.
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          The primary method invoked when the Jetspeed servlet is executed.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          In this application doGet and doPost are the same thing.
 void init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Initializes the services which need RunData to initialize themselves (post startup).
 void init(javax.servlet.ServletConfig config)
          Intialize Servlet.
protected  org.apache.jetspeed.components.ComponentManager initializeComponentManager(javax.servlet.ServletConfig servletConfig, String appRoot, org.apache.commons.configuration.Configuration configuration)
          If you prefer to use a component manager other than Spring, you can override this method to do so.
 void sessionCreated(javax.servlet.http.HttpSessionEvent se)
           
 void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

console

private static org.apache.commons.logging.Log console

firstInit

private static boolean firstInit
In certain situations the init() method is called more than once, somtimes even concurrently. This causes bad things to happen, so we use this flag to prevent it.


initFailure

private static Throwable initFailure
Whether init succeeded or not.


firstDoGet

private static boolean firstDoGet
Should initialization activities be performed during doGet() execution?


engine

private static org.apache.jetspeed.engine.Engine engine
The Jetspeed Engine


contextComponent

private static org.apache.jetspeed.request.RequestContextComponent contextComponent

webappRoot

private static String webappRoot

INIT_START_MSG

private static final String INIT_START_MSG
See Also:
Constant Field Values

INIT_DONE_MSG

private static final String INIT_DONE_MSG
See Also:
Constant Field Values
Constructor Detail

JetspeedServlet

public JetspeedServlet()
Method Detail

init

public final void init(javax.servlet.ServletConfig config)
                throws javax.servlet.ServletException
Intialize Servlet.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

init

public final void init(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
Initializes the services which need RunData to initialize themselves (post startup).

Parameters:
data - The first GET request.

doGet

public final void doGet(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse res)
                 throws IOException,
                        javax.servlet.ServletException
The primary method invoked when the Jetspeed servlet is executed.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
req - Servlet request.
res - Servlet response.
Throws:
IOException - a servlet exception.
javax.servlet.ServletException - a servlet exception.

doPost

public final void doPost(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res)
                  throws IOException,
                         javax.servlet.ServletException
In this application doGet and doPost are the same thing.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
req - Servlet request.
res - Servlet response.
Throws:
IOException - a servlet exception.
javax.servlet.ServletException - a servlet exception.

destroy

public final void destroy()
The Servlet destroy method. Invokes ServiceBroker tear down method.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

initializeComponentManager

protected org.apache.jetspeed.components.ComponentManager initializeComponentManager(javax.servlet.ServletConfig servletConfig,
                                                                                     String appRoot,
                                                                                     org.apache.commons.configuration.Configuration configuration)
                                                                              throws IOException
If you prefer to use a component manager other than Spring, you can override this method to do so. Do not explicitly call start() of the ComponentManager as the JetspeedEngine will do this within its own start() method.

Parameters:
servletConfig -
appRoot -
configuration -
Returns:
Throws:
IOException

sessionCreated

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

sessionDestroyed

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


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.