IBM Support

Setting server MIME types for common file formats

Troubleshooting


Problem

Artifacts and attachments open with the wrong program or save with the incorrect file extension. For example, a Microsoft Word document opens in the browser as unreadable text and is saved to disk as a .html file instead of a .doc file, an Excel file has a .zip extension, or a .jar file is downloaded and saved as a .zip file.

Cause

The MIME type of a file is retrieved from the application server. Most application servers, including IBM® WebSphere® Application Server and Tomcat, come with some predefined MIME types. However, many common file formats are still missing from the default types and must be defined by a server administrator.

For a list of the MIME types for Microsoft Office 2007, see http://technet.microsoft.com/en-us/library/ee309278%28office.12%29.aspx


For a list of other important MIME types that your server might need to manage see
http://technet.microsoft.com/en-us/library/bb742440.aspx#ECAA

Resolving The Problem

For WebSphere Application Server v6.0 servers:
1. Start the WebSphere Application Server Admin Console.
2. Click the Environment -> Virtual Hosts link.
3. Select the virtual host where IBM Rational® Asset Manager is installed, for example: default_host.
4. Click the MIME Types link under "Additional Properties."
5. Review the current MIME types. Click New to add a new MIME Type.
NOTE: When adding a new MIME Type, enter the type such as "application/msword" then enter the Extensions which will follow that type with spaces between them, for example "doc docx" for Microsoft Word documents.
6. After adding all new types, click Apply >OK >Save.
7. Click Save again to complete the changes.
8. Restart the WebSphere Application Server server.

For embedded WebSphere Application Server v6.1 or other WebSphere Application Server servers without an admin console:
1. Locate the virtualhosts.xml file in the folder
WAS_HOME/profiles/<profile name>/config/cells/<cell name>
2. MIME types are defined in the following XML format:
<mimeTypes xmi:id="MimeEntry_91" type="application/msword">
<extensions>doc</extensions>
<extensions>docx</extensions>
</mimeTypes>
Where "MimeEntry_91" is a unique identifier in the file.
3. Save the file.
4. Start the WebSphere Application Server server.

For Tomcat v5.0 servers:
1. Locate the web.xml file in the folder TOMCAT_HOME/conf
2. MIME types are defined in the following XML format:
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
3. Save the file.
4. Start the Tomcat server.

MIME Types will be correctly set on any new files added to Rational Asset Manager after these changes have been successfully completed.

Not all MIME types that your server might need to support are listed on the following page:
http://technet.microsoft.com/en-us/library/bb742440.aspx#ECAA

For other MIME types that you might need to add to your application server, see the following table:

File extensionMIME type
.jarapplication/x-jar

[{"Product":{"code":"SSUS84","label":"Rational Asset Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Server","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.1;7.1.0.1;7.1.1;7.1.1.1;7.2;7.2.0.1;7.2.0.2;7.5;7.5.0.1;7.5.0.2;7.5.1;7.5.1.1","Edition":"Enterprise;Standard","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21269129