Quantcast
Channel: Java mon amour
Viewing all articles
Browse latest Browse all 1121

WebLogic mime mappings

$
0
0
To configure mime-mappings in WebLogic, you have 2 ways.
One is to configure the whole domain, with a mimemappings.properties file.
This is the entry in config.xml (you can do it in console, domain, webapplications):


<web-app-container>
<x-powered-by-header-level>NONE</x-powered-by-header-level>
<mime-mapping-file>./config/mimemappings.properties</mime-mapping-file>
</web-app-container>



Mime Mapping File

Returns the name of the file containing mime-mappings for the domain.

Format of the file should be: extension=mime-type

Example:
htm=text/html
gif=image/gif
jpg=image/jpeg

If this file does not exist, WebLogic Server uses an implicit mime-mapping set of mappings defined in weblogic.utils.http.HttpConstants (DEFAULT_MIME_MAPPINGS). To remove a mapping defined in implicit map just set it to blank.

MBean Attribute:
WebAppContainerMBean.MimeMappingFile




The other way is to create an entry in your web application's web.xml

For a general presentation of IE11 and Mime: https://msdn.microsoft.com/en-us/library/ms775148%28v=vs.85%29.aspx

Remember also the default-mime-type attribute in weblogic.xml. "This element allows the user to specify the default mime type for a content-type for which the extension is not mapped."


Viewing all articles
Browse latest Browse all 1121

Trending Articles