One of the functions of the servlet pipeline is to modify a request as it runs through various processing elements. For example, one pipeline element might find the file associated with a given pathInfo, and use that file name to set the pathTranslated property of the request.

Unfortunately, the HttpServletRequest interface is immutable – it only provides methods for reading the various properties, but does not provide methods for setting those properties. To solve this problem, Dynamo provides a class called atg.servlet.DynamoHttpServletRequest. This class implements HttpServletRequest, but also provides methods that allow you to change the properties of the request, such as setPathInfo or setPathTranslated.

There is also a corresponding atg.servlet.DynamoHttpServletResponse that allows you to change properties of the HttpServletResponse, such as the output stream, and access its values, such as statusCode.

The very first element of the servlet pipeline converts an incoming HttpServletRequest/Response pair into a DynamoHttpServletRequest/Response pair. This allows subsequent elements of the servlet pipeline to use the additional functions provided by DynamoHttpServletRequest/Response. These functions are outlined below.

 
loading table of contents...