Sun Java System Web Server 6.1 SP10 Administrator's Configuration File Reference


Applicable in ObjectType-class directives.

The type-by-extension function instructs the server to look in a table of MIME type mappings to find the MIME type of the requested resource according to the extension of the requested resource. The MIME type is added to the Content-Type header sent back to the client.

The table of MIME type mappings is created by a MIME element in the server.xml file, which loads a MIME types file or list and creates the mappings. For more information about server.xml and MIME types files, see the Sun Java System Web Server 6.1 SP10 Administrator’s Configuration File Reference.

For example, the following two lines are part of a MIME types file:

type=text/html    exts=htm,htmltype=text/plain    exts=txt


If the extension of the requested resource is htm or html, the type-by-extension file sets the type to text/html. If the extension is .txt, the function sets the type to text/plain.


The following table describes parameters for the type-by-extension function.

Table 4–38 type-by-extension Parameters




(Optional) Common to all obj.conf functions.


ObjectType fn=type-by-extension


See Also

type-by-exp, force-type