/atg/dynamo/servlet/dafpipeline/MimeTyperServlet (DAF)
/atg/dynamo/servlet/pipeline/MimeTyperServlet (DAS)

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

The servlet must be configured with a property called mimeTyper. This property points to another service, usually an atg.servlet.ExtensionMimeTyper. This MIME typer service contains a list of extensions and the MIME types to which those extensions correspond.

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 Dynamo default to the forbidden MIME type. The forbidden MIME type designates file types that might compromise a web site’s security if Dynamo 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 specifically configure any MIME types that you want Dynamo to be able to serve in addition to those already configured in the MimeTyper.

Adding New MIME Types

You can provide for the handling of additional MIME types by modifying the extensionToMimeType property of the MIME typer. This property takes a comma-separated list of comma-separated pairs of file name extensions and MIME types. For example:


You can add to the list of MIME types that the MIME typer can recognize. To do this, use the ATG Control Center Components editor to add new values to the /atg/dynamo/servlet/pipeline/MimeTyper component. You can also make this change in a text editor:

Then, you can configure the MimeTypeDispatcher to specify how the servlet pipeline should handle requests of those MIME types.

loading table of contents...