org.apache.turbine
Class Turbine

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.apache.turbine.Turbine
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Turbine
extends javax.servlet.http.HttpServlet

Turbine is the main servlet for the entire system. It is final because you should not ever need to subclass this servlet. If you need to perform initialization of a service, then you should implement the Services API and let your code be initialized by it. If you need to override something in the doGet() or doPost() methods, edit the TurbineResources.properties file and specify your own classes there.

Turbine servlet recognizes the following initialization parameters.


Version:
$Id: Turbine.java,v 1.56.4.4 2001/06/01 01:33:06 jvanzyl Exp $
Author:
Jon S. Stevens, Brett McLaughlin, Greg Ritter, John D. McNally, Frank Y. Kim, Rafal Krzewski, Jason van Zyl
See Also:
Serialized Form

Field Summary
static java.lang.String BASEDIR_KEY
          The base directory key
static java.lang.String REDIRECTED_PATHINFO_NAME
          Name of path info parameter used to indicate the redirected stage of a given user's initial Turbine request
 
Constructor Summary
Turbine()
           
 
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 Turbine 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.
 java.lang.String getServletInfo()
          Return the servlet info.
 void init(RunData data)
          Initializes the services which need RunData to initialize themselves (post startup).
 void init(javax.servlet.ServletConfig config)
          This init method will load the default resources from a properties file.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REDIRECTED_PATHINFO_NAME

public static final java.lang.String REDIRECTED_PATHINFO_NAME
Name of path info parameter used to indicate the redirected stage of a given user's initial Turbine request

See Also:
Constant Field Values

BASEDIR_KEY

public static final java.lang.String BASEDIR_KEY
The base directory key

See Also:
Constant Field Values
Constructor Detail

Turbine

public Turbine()
Method Detail

init

public final void init(javax.servlet.ServletConfig config)
                throws javax.servlet.ServletException
This init method will load the default resources from a properties file.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - typical Servlet initialization parameter.
Throws:
javax.servlet.ServletException - a servlet exception.

init

public final void init(RunData data)
Initializes the services which need RunData to initialize themselves (post startup).

Parameters:
data - The first GET request.

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

doGet

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

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
req - Servlet request.
res - Servlet response.
Throws:
java.io.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 java.io.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:
java.io.IOException - a servlet exception.
javax.servlet.ServletException - a servlet exception.

getServletInfo

public final java.lang.String getServletInfo()
Return the servlet info.

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet
Returns:
a string with the servlet information.


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.