WebObjects: Direct Connect HTTP Server Does Not Serve All MIME Types

WebObjects applications using certain MIME types cannot serve these MIME types in Direct Connect mode. WebObjects returns the Main.wo component instead of the MIME type files when WebObjects application users try to access them.
Symptom
The application responds to that request by returning the main component, Main.wo.


Solution

WebObjects includes MIME.plist in the JavaWebObjects.framework, or in the WebObjects.framework in WebObjects 4.5.1 and earlier. The MIME.plist maps MIME file extensions to MIME file types. WebObjects applications in Direct Connect mode access the MIME.plist file, which instructs browsers how to treat data they are about to receive. The MIME.plist file is static and sometimes omits the MIME types that developers wish to use. Typically, new media types are introduced more frequently than WebObjects is updated. In order to use new media types, developers need to be able to introduce these new media types in their WebObjects applications.

Updating the MIME.plist

Developers can update MIME.plist with media types that are not already listed, so that WebObjects can serve the new media types. The steps for adding media types is listed in the subsections below. The example used Flash files, which are supported in WebObjects 5.2, but the steps are identical for adding other media types not listed in the MIME.plist file.

Developer Note: if a MIME type is missing from the MIME.plist, submit a bug report at (http://bugreport.apple.com), so the MIME.plist can be updated with new media types in future releases.

Adding Media Types in WebObjects 4.5.1 and Earlier on Mac OS X

These steps explain how to add support for Flash Files, but can used for other media types, too. Simply use the proper media type information in step 3.


Adding Media Types in WebObjects 5.0 and later on Mac OS X

These steps explain how to add support for Flash Files, but can used for other media types, too. Simply use the proper media type information in step 3.


Adding Media Types in WebObjects 4.5.1 and earlier on Microsoft Windows NT or Windows 2000

These steps explain how to add support for Flash Files, but can used for other media types, too. Simply use the proper media type information in step 3.


Adding Media Types in WebObjects 5.0 and Later on Microsoft Windows NT or Windows 2000
Published Date: Feb 19, 2012