users@glassfish.java.net

Re: Glassfish mime type setup for unknown file extension.

From: <Jan.Luehe_at_Sun.COM>
Date: Wed, 09 Apr 2008 10:31:38 -0700

Jeanfrancois Arcand wrote:

>
>
> glassfish_at_javadesktop.org wrote:
>
>> Hello. I know how to do a mime type set up for a common file
>> extension like .ppt, .css, .exe etc.
>> http://hobione.wordpress.com/2008/02/12/application-server-mime-type-set-up/
>>
>> But how would you set up for an uncommon file extension mime type. I
>> have files usually for firmware extension like .cpg
>> (AOS-oldMobile.cpg) or .DBF (AAL_ROC.DBF).
>>
>> My question is how I can tell GlassFish that if the file extension is
>> not on the domains/domain1/config/default-web.xml, just pop up a Save
>> As instead of spit it out to the browser.
>>
>> I have tried this, but did not work:
>
>
> Have you redeployed your application? If not, that's the issue. By
> default, the deployment back end doesn't update the default web.xml
> file (this is a bug that will be fixed in v3) and hence you need to
> redeploy.


The bug Jeanfrancois is referring to is

  https://glassfish.dev.java.net/issues/show_bug.cgi?id=3844
  ("Treat default-web.xml as runtime instead of a deploytime option")

Thanks to the deployment team, the fix will be available in the 9.1.1
release
(and is already available in promoted builds for that release).

Jan



>
> Try it and let us know!
>
> -- Jeanfrancois
>
>
>>
>> <mime-mapping>
>> <extension>*</extension>
>> <mime-type>text/plain</mime-type>
>> </mime-mapping>
>>
>> or,
>> <mime-mapping>
>> <extension>cpg</extension>
>> <mime-type>text/plain</mime-type>
>> </mime-mapping>
>>
>> Please advise.
>> Hobi
>> [Message sent by forum member 'hobione' (hobione)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=268259
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>