Class

atg.servlet.pipeline.MimeTyperPipelineServlet

Component

/atg/dynamo/servlet/dafpipeline/MimeTyperServlet

The MimeTyperServlet examines a request’s pathTranslated property to determine its MIME type. The MIME type is then added as an attribute of the request called MimeTyperPipelineServlet.ATTRIBUTE_NAME.

The servlet property mimeTyper must be configured. This property points to another service, usually an atg.servlet.ExtensionMimeTyper. This MIME type service contains a list of extensions and corresponding MIME types.

The servlet adds the MIME type using an attribute factory, so that the MIME type is not actually calculated until the first time it is needed.

Forbidden Mime Type

All file types unknown to an Oracle ATG Web Commerce server default to the forbidden MIME type. The forbidden MIME type designates file types that might compromise a web site’s security if the Oracle ATG Web Commerce server served them back to a client, such as .log, .properties, or .ini files. Dynamo rejects all requests for files of these MIME types and passes them to SendErrorServlet, which returns a 404 error. Therefore, you must configure any MIME types that you want served in addition to those already configured in the MimeTyperServlet.

Adding MIME Types

In order to specify handling of additional MIME types, reconfigure the component /atg/dynamo/servlet/pipeline/MimeTyper (class atg.servlet.ExtensionMimeTyper), which is referenced by the MimeTyperServlet's mimeTyper property. The MimeTyper's extensionToMimeType property is a string array that pairs filename extensions to MIME types. For example:

shtml,magnus-internal/parsed-html,\
cgi,magnus-internal/cgi,\
jsp,dynamo-internal/html,\

After you add the desired MIME types, configure the MimeTypeDispatcher to specify how the servlet pipeline handles requests of those MIME types


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices