There are a multitude of file types out on the World Wide Web. When the HotJavaTM Browser encounters a file that it can't display in a Web page, it looks in a table of viewer applications to find out how to display the file based on its type. For example, when it encounters an audio file, it launches the appropriate audio player.
The HotJava Browser determines the type of a file by referencing its MIME (Multipurpose Internet Mail Extensions) type, which is sent to the browser from the http server along with the file. This tells HotJava the general type of file (text, audio, image, video, application, message, or multipart), and a more specific subtype (e.g. PostScript, TIFF, ZIP compressed data, and so on).
If a file's MIME type is not available (for example, if the file is loaded with a non-http protocol, such as the ftp or file protocol), HotJava uses the file's extension to map the file to a MIME type. The file extension is simply the last letters of the file name, which appear after a period. For example, a file named "myfile.txt" has ".txt" as its file extension, and maps to the text/plain MIME type.
The HotJava Browser uses a table of content type definitions, found on the
NOTE: You must tell HotJava where on your system to find your external applications by setting the exec.path property in your HotJava properties file. See Setting the exec.path Property for information.
To see how HotJava currently handles files of a particular type, select the type from the Content Types scrolling list. You can modify the following information for that content type by updating the fields to the right of the Content Types scrolling list, and clicking Apply:
For example, suppose you want to add a new file extension, (.abc), to the list of Plain Text file extensions, so files with that extension will be treated as plain ASCII text. You can do this by selecting the Plain Text Content Type, adding ".abc" to the Extensions field, and clicking Apply. Remember, however, that the HotJava Browser first looks to the file's MIME type, not its extension. Thus if a file with the new extension is sent from an http server to the HotJava Browser along with a MIME type, the file's extension will be ignored.
To add a new Content Type, follow the steps below. These steps show an example of how you would either add support for a type of images called Raster images, using a viewer application called imagetool, or how you would add support for bitmap images using your Windows Paint application. You can use these steps to add support for any other file type and/or viewer application.
NOTE: If you type in an application without the full path name to where the application is located on your file system, you must make sure the exec.path property is set. (See Setting the exec.path Property.) If you click on Choose to select an application, the full path name is entered into the Application field, so you don't need to be concerned about the exec.path property for this particular application.
NOTE: If you select a MIME Type/Subtype combination that is already defined, your new definition (description, extensions, action, and application) will override the previous definition.
You should see your new definition in the Content Types scrolling list, and you can now access files of that type using the action you specified.
If your Action was View in Application, you'll notice that the HotJava Browser appends %s at the end of the Application definition when you click on Apply. It uses the %s later to substitute the actual file being opened.
In some circumstances, the HotJava Browser creates temporary files to display content within the browser or to launch external applications. See Temporary Files for Viewer Applications for information about the location of these files, and how you can control whether or not some of these files are automatically deleted.
Back to HotJava User's Guide Table of Contents
Follow these links for information about other Preferences pages: