One of Dynamo’s most important tasks is handling HTTP requests. In handling these requests, Dynamo uses session tracking, page compilation, Java Server Pages, and other powerful extensions to the basic Web server model.

Request handling can usually be broken down into a series of independent steps. Each step may depend on additional information being available about the request, so order does matter. However, the individual steps are separable. For example, a typical request might go through these steps:

This is only one of many possible request-handling configurations. Other configurations might dispatch based on a beginning path such as /cgi-bin. Other configurations might move the session-tracking step to be performed only for files with the MIME type “text/session-tracked.”

In Nucleus-based applications, each of these steps is represented by a single Nucleus service that also implements the Servlet interface. Most requests handled by Nucleus are dispatched to the PageFilter filter or DynamoProxyServlet, either of which start the servlet pipeline. Each servlet in turn performs its specific function on the request. Each servlet is also configured with a reference to the next servlet in the pipeline. When a servlet is done acting on the request, it can pass the request to the next servlet. This linked list of servlets is called a request-handlingpipeline.

Treating the request-handling process as a pipeline of independent elements allows request-handling to be treated in a component-oriented manner. This allows you to use Nucleus to customize the request-handling process through configurable components, thereby giving you the flexibility that is often required by enterprise applications.

The request-handling pipeline in Dynamo allows you to do the following:

There are two request-handling pipelines used by Dynamo: the DAS servlet pipeline (for JHTML requests) and the DAF servlet pipeline (for JSP requests). When a JHTML page is requested, the DAS servlet pipeline runs through the set of servlets appropriate for conditions of the request as would the DAF servlet pipeline for JSP requests. Because JHTML is a proprietary language, it relies on the page compiler provided in the DAS servlet pipeline to generate JHTML into a servlet that’s rendered as HTML by the application server. Other minor differences exist between the request-handling pipelines, but many ofthe classes invoked for each are the same.

This chapter includes the following sections that describe how to use and customize the DAF servlet pipeline:

This chapter does not address any of the features provided by the ATG Portal module. See the Portal Requests and the Filter Chain chapter of the ATG Portal Development Guide for specific information.

 
loading table of contents...