The second resource called by the Web container executes the request-handling pipeline. The resource you specify here depends on the type of pages you author:
For JSPs, specify the
PageFilter
filter.For JHTML pages, specify the
DynamoProxyServlet
servlet.
Both PageFilter
and DynamoProxyServlet
call an instance of DynamoHandler
, which is the first servlet in the pipeline. DynamoHandler
generates a DynamoHTTPServletRequest
(called the Dynamo request) that wraps the generic HTTPServletRequest
so that servlets are able to read information on the request as well as modify the request itself. A matching DynamoHTTPServletResponse
is also generated. DynamoHandler
passes the Dynamo request/response pair to the next servlet in the request-handling pipeline. This pipeline is a series of servlets that share dynamic information about the request and response with the Nucleus framework in order to render the requested page.
Although DynamoHandler
chiefly does the same thing in both pipelines, a different version of it is used for each request type.
PageFilter
calls/atg/dynamo/servlet/dafpipeline
/DynamoHandler
to start the DAF servlet pipeline for JSP requests.DynamoProxyServlet
calls/atg/dynamo/servlet/pipeline/DynamoHandler
to start the DAS servlet pipeline for JHTML requests.
The main difference between the DAS and DAF servlet pipelines is that the DAS servlet pipeline automatically compiles the page from JHTML to Java, whereas the DAF servlet pipeline relies on the application server to handle the complete page compilation process.
Sites that use JSPs: PageFilter
When your site uses JSPs, include PageFilter
in web.xml
:
Insert the filter name and class name in enclosing
<filter>
tags.Map the filter to either a directory holding JSPs or the
.jsp
extension. This information is included in enclosing<filter-mapping>
tags.
This example shows the code you should include in web.xml
:
<filter> <filter-name>PageFilter</filter-name> <filter-class>atg.filter.dspjsp.PageFilter</filter-class> </filter> <filter-mapping> <filter-name>PageFilter</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping>
Sites that use JHTML Pages: DynamoProxyServlet
To use DynamoProxyServlet
in web.xml
:
Insert the servlet name, class, and execution order in enclosing
<servlet>
tags. The order of execution should be 2, so thatDynamoProxyServlet
runs just afterNucleusServlet
.Map this servlet either to the directory holding JHTML files or to the extension
.jhtml
. This information is provided in enclosing<servlet-mapping>
tags.
This example shows the code you should include in web.xml
:
<servlet> <servlet-name>DynamoProxyServlet</servlet-name> <servlet-class>atg.nucleus.servlet.NucleusProxyServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>DynamoProxyServlet</servlet-name> <url-pattern>/dyn/*</url-pattern> </servlet-mapping>
Sites that Use JSPs and JHTML Pages
For sites using both JSP and JHTML pages, you need to define both PageFilter
and DynamoProxyServlet
resources in your web.xml
so they are available when needed. For each request, one of the two resources is called just after NucleusServlet
.
<filter> <filter-name>PageFilter</filter-name> <filter-class>atg.filter.dspjsp.PageFilter</filter-class> </filter> <filter-mapping> <filter-name>PageFilter</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> <servlet> <servlet-name>DynamoProxyServlet</servlet-name> <servlet-class>atg.nucleus.servlet.NucleusProxyServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>DynamoProxyServlet</servlet-name> <url-pattern>/dyn/*</url-pattern> </servlet-mapping>
Notice that, in this example, PageFilter
is mapped to a file extension and DynamoProxyServlet
a directory.