Class |
|
---|---|
Component |
|
MimeTypeDispatcher
is an instance of a subclass of DispatcherPipelineServlet
that sends a request to one of several servlets depending on the MIME type of the request. The dispatcherServiceMap
property specifies the mapping from MIME type to servlet. For example, the default value of this property is:
dispatcherServiceMap=\
dynamo-internal/forbidden=SendErrorServlet,\
dynamo-internal/hdml=HTMLServlet,\
dynamo-internal/html=../pagecompile/DropletEventServlet,\
dynamo-internal/wml=../pagecompile/DropletEventServlet,\
magnus-internal/parsed-html=../pagecompile/DropletEventServlet,\
text/html=HtmlServlet,\
text/vnd.wap.wml=HTMLServlet,\
text/x-hdml=HTMLServlet
The MIME type is extracted from the MimeTyperPipelineServlet.ATTRIBUTE_NAME
, so the MimeTyperServlet
must appear before this servlet in the pipeline. Before you add a new MIME type to the dispatcherServiceMap
, you must make sure the MimeTyper
is configured to recognize it in the extensionToMimeType
property at /atg/dynamo/servlet/pipeline/MimeTyper.properties
. See Adding New MIME Types. Also make sure that any servlet you include in the dispatcherServiceMap
property has global scope.
In the standard Dynamo pipeline servlet, requests for MIME type text/html
are dispatched to HtmlServlet. Requests for MIME type magnus-internal/parsed-html
or dynamo-internal/html
are passed to the DAFDropletEventServlet (or DropletEventServlet on DAS) and requests for MIME type dynamo-internal/forbidden
are sent to SendErrorServlet If the request does not match any of the MIME types in the dispatcherServiceMap
, the request is passed to FileServlet.