com.arsdigita.web
Class BaseApplicationServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.arsdigita.web.BaseServlet
              extended bycom.arsdigita.web.BaseApplicationServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
ApplicationFileServlet, BebopApplicationServlet, LegacyAdapterServlet

public abstract class BaseApplicationServlet
extends BaseServlet

The base servlet for CCM applications. It manages database transactions, prepares an execution context for the request, and traps and handles requests to redirect.

Most CCM applications will extend this class by implementing doService(HttpServletRequest,HttpServletResponse,Application) to perform application-private dispatch to UI code.

Author:
Justin Ross <jross@redhat.com>
See Also:
BaseServlet, DispatcherServlet, RedirectSignal, Serialized Form

Field Summary
static String APPLICATION_ID_ATTRIBUTE
          The ID of the application whose service is requested.
static String APPLICATION_ID_PARAMETER
          The same as APPLICATION_ID_ATTRIBUTE, but as a request parameter.
static String versionId
           
 
Fields inherited from class com.arsdigita.web.BaseServlet
REQUEST_URL_ATTRIBUTE
 
Constructor Summary
BaseApplicationServlet()
           
 
Method Summary
protected  void doService(javax.servlet.http.HttpServletRequest sreq, javax.servlet.http.HttpServletResponse sresp)
          Augments the context of the request and delegates to doService(HttpServletRequest,HttpServletResponse,Application).
protected abstract  void doService(javax.servlet.http.HttpServletRequest sreq, javax.servlet.http.HttpServletResponse sresp, Application app)
          The method that doService(HttpServletRequest,HttpServletResponse) calls.
 
Methods inherited from class com.arsdigita.web.BaseServlet
destroy, doDestroy, doGet, doInit, doPost, getUserContext, init
 
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

versionId

public static final String versionId
See Also:
Constant Field Values

APPLICATION_ID_ATTRIBUTE

public static final String APPLICATION_ID_ATTRIBUTE

The ID of the application whose service is requested. This request attribute must be set by a previous servlet or filter before this servlet can proceed. In CCM, the default servlet, DispatcherServlet, sets this attribute.


APPLICATION_ID_PARAMETER

public static final String APPLICATION_ID_PARAMETER

The same as APPLICATION_ID_ATTRIBUTE, but as a request parameter. This is present so applications not using the dispatcher servlet may accept requests directly to their servlets, provided the application ID is given in the URL.

See Also:
Constant Field Values
Constructor Detail

BaseApplicationServlet

public BaseApplicationServlet()
Method Detail

doService

protected final void doService(javax.servlet.http.HttpServletRequest sreq,
                               javax.servlet.http.HttpServletResponse sresp)
                        throws javax.servlet.ServletException,
                               IOException

Augments the context of the request and delegates to doService(HttpServletRequest,HttpServletResponse,Application).

Overrides:
doService in class BaseServlet
Throws:
javax.servlet.ServletException
IOException
See Also:
BaseServlet.doService(HttpServletRequest,HttpServletResponse)

doService

protected abstract void doService(javax.servlet.http.HttpServletRequest sreq,
                                  javax.servlet.http.HttpServletResponse sresp,
                                  Application app)
                           throws javax.servlet.ServletException,
                                  IOException

The method that doService(HttpServletRequest,HttpServletResponse) calls. Servlet authors should implement this method to perform application-specific request handling.

Throws:
javax.servlet.ServletException
IOException
See Also:
HttpServlet.service(HttpServletRequest,HttpServletResponse)


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC