Sun Java System Web Server 7.0 Administrator's Guide

Changing the Default MIME Type

When a document is sent to a client, the server includes a section that identifies the document’s type, so the client can present the document in the right way. However, sometimes the server can’t determine the proper type for the document because the document’s extension is not defined for the server. In those cases, a default value is sent.

The default is usually text/plain, but you should set it to the type of file most commonly stored on your server. Some common MIME types include the following:

  • text/plain

  • text/html

  • text/richtext

  • image/tiff

  • image/jpeg

  • image/gif

  • application/x-tar

  • application/postscript

  • application/x-gzip

  • audio/basic

ProcedureTo Change the Default MIME Type

  1. Select the Configuration.

    Select the configuration from the configurations list. Click Configurations tab to get the available configurations.

  2. Select the Virtual Server.

    Click Virtual Servers tab to get the list of configured virtual servers for the selected configuration.

  3. Click Content Handling > General tab.

  4. Change Default MIME Type value under Miscellaneous section


    Note –

    Using CLI

    For creating a MIME type through CLI, execute the following command.


    wadm> create-mime-type --user=admin --password-file=admin.pwd --host=serverhost 
    --port=8989 --config=config1 --extensions=sxc application/sxc

    See CLI Reference, create-mime-type(1).

    You need not create a separate MIME types file for each virtual server. Instead, you can create as many MIME types files as you require and associate them with a virtual server. By default, one MIME types file (mime.types) exists on the server and cannot be deleted.