My Oracle Support Banner

Unable To Find File MIME Type In Webapp JSP Of Weblogic Server (Doc ID 1295934.1)

Last updated on JUNE 07, 2022

Applies to:

Oracle WebLogic Server - Version 10.3.2 and later
Information in this document applies to any platform.

Symptoms

Web application (webapp) is deployed on Weblogic 10.3.2 (WLS) with Sun JDK 1.6.0_18.

As per JDK javadoc on MIME type, a file named "mime.types" with the extra file types is placed in the META-INF/ directory of the webapp.  This is in accordance to the search order for MIME type, as noted in JDK javadoc, is as follows:

  1. Programmatically added entries to the MimetypesFileTypeMap instance.
  2. The file .mime.types in the user's home directory.
  3. The file <JAVA_HOME>/lib/mime.types.
  4. The file or resources named META-INF/mime.types.
  5. The file or resource named META-INF/mimetypes.default (usually found only in the activation.jar file).

When invoking test JSP in the webapp, instead of the expected result --

Word file::application/msword
Text file::text/plain


WLS 10.3.2 returns the following incorrect result --

Word file::application/octet-stream
Text file::text/plain



Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.