org.apache.jetspeed.engine
Class JetspeedServlet

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

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

Jetspeed Servlet entry point.

Version:
$Id: JetspeedServlet.java 225613 2005-07-27 20:31:50Z weaver $
Author:
David Sean Taylor
See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log console
           
private static 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 class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Fields inherited from interface org.apache.jetspeed.engine.JetspeedEngineConstants
APPLICATION_ROOT_DEFAULT, APPLICATION_ROOT_KEY, CONFIG_NAMESPACE, CONSOLE_LOGGER, DEFAULT_LOGGER, JETSPEED_CONFIGURATION_DEFAULT, JETSPEED_CONFIGURATION_KEY, 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
private  void debugHeaders(javax.servlet.http.HttpServletRequest req)
           
 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.
 
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 final org.apache.commons.logging.Log log

console

private static final 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 Engine engine
The Jetspeed Engine


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
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).


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.

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.

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

debugHeaders

private void debugHeaders(javax.servlet.http.HttpServletRequest req)

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


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