JavaServer

MIME Types


Contents / Administrator Docs / Developer Docs / Index / AdminTool Contents

This document has the following sections:

The MIME Types page allows you to add, edit, or delete suffix mappings. Suffix mappings are used to map file extensions to MIME types (a method for determining file formats), so that the JavaTM Web ServerTM can determine the type and contents of any HTTP file request it receives. The Java Web Server uses the suffix mappings to determine how to return data to the World Wide Web client making the request.

This page displays a list of predefined suffix mappings. If Java Web Server can't find a suffix mapping entry in this list, it uses the default MIME type text/plain. This means that the server uses the text transfer method and assumes that it is returning plain text.

Note:

The file extension is read as lower-case (thus, HTML is equivalent to html) for the purposes of mapping it against the appropriate MIME type. If you need the extension to be read in a case-sensitive manner, you can set this behavior in the httpd.properties file of the selected service.
For instance, to have file extensions read in a case-sensitive manner for your Web Service
  1. change to the directory containing the httpd file for that service
    % cd <server_root>/ properties/server/javawebserver/adminservice/httpd.properties
  2. add the following line
    mime.extension.casesensitive=True

Settings

The MIME Types page has the following settings:

Extension
A list of possible extensions that could be attached to any file request. For example, the .gif extension indicates that the requested file is of the type/subtype image/gif (Graphics Image Format).

Note: For easier suffix mapping and fielding of requests, it is possible to enter spelling variations for common extensions into the Extension list. For example, you could enter both gif and giff into the list as variations of the type/subtype image/gif. This way, the Java Web Server will properly service requests for the file type even if the requesting suffix is misspelled.

Type/Subtype
A list of file types recognized by the Java Web Server. The Type part of the pair indicates the generic file category possible to be served by the Java Web Server, for example, audio, application, image, etc. The Subtype part of the pair indicates the exact file extension for that generic category.

Procedures

To Create a New Suffix Mapping:

  1. Click Add.
  2. Enter the file extension or suffix associated with the file format.
  3. Enter the MIME Type/Subtype you want to associate with the file extension.
  4. Click Save.

To Remove a Suffix Mapping:

  1. Select the entry you want to delete.
  2. Click Remove.
  3. Click Save.

To Modify a Suffix Mapping:

  1. Select the field you want to modify.
  2. Click Modify.
  3. Enter the new text, or append text to the existing entry.
  4. Press Return.
  5. Click Save.

Buttons

To make changes to the MIME Types page and have those settings take affect, use the five buttons at the bottom of the screen. These are:

Note: If you Add, Modify, or Remove a MIME type, you must Save before the change will take effect.


Top
java-server-feedback@java.sun.com
Copyright © 1997 Sun Microsystems, Inc.
All Rights Reserved.