Multi-purpose internet mail extension mappings for WebLogic Server

Multi-Purpose Internet Mail Extensions (MIME) mapping associates a file name extension with a data file type (text, audio, image). You use these properties to map a MIME type to a file name extension. MIME is only for WebLogic Server.

The MIME-mapping element in a web.xml file defines the mapping between a file name extension and a MIME type. When you create a doclinks\WEB-INF directory, you copy a web.xml file into the directory. If you have trouble viewing certain document file types in the directory, review these steps:

The web.xml file contains a series of parameters for mapping MIME data types. These parameters correspond to various types of document applications. For example, there is a parameter for .doc documents that corresponds to Microsoft Word documents:

The <extension> value is doc. and the <mime-type> value is application/msword.

The web.xml file can accommodate most common file types. If you have other types of documents that do not open for viewing as attachements, edit this file as follows to map your data type:

  1. Copy a mime-mapping section in the file.
  2. Paste it in a new section.
  3. Change the appropriate application parameter lines to see the relevant applications extension and MIME type.

Finding the MIME type for an application

To find the MIME type for an application:

  1. Access the Window registry.
  2. Click Windows Start then click Run and type regedit.
  3. Go to the HKEY_CLASSES_ROOT folder.
  4. Expand the folder, and click the application extension. The mime-type appears on the Content Type line, under Data.

    For example, for PDF documents, the MIME type is application/pdf.

  5. After you edit the web.xml file, rebuild and redeploy the EAR file.


Feedback