Skip to main content

how to set content type as a CSV file

4 replies [Last post]
Anonymous

Hi
I want to set content type in my servlet as a CSV(Comma separated version ) file i am using :

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kazssym
Offline
Joined: 2007-04-18

text/csv has been officially registered.

See http://www.iana.org/assignments/media-types/text/

Jan Luehe

Have you tried adding these mappings to your domain's default-web.xml:


csv
text/csv


csv
text/comma-separated-values

Jan

On 12/ 1/08 09:53 PM, glassfish@javadesktop.org wrote:
> text/csv has been officially registered.
>
> See http://www.iana.org/assignments/media-types/text/
> [Message sent by forum member 'kazssym' (kazssym)]
>
> http://forums.java.net/jive/thread.jspa?messageID=319482
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

scatari
Offline
Joined: 2005-06-17

Please see if this would work

res.setContentType("text/comma-separated-values");

HTH
-Sathyan

Rajeev Kumar

Sorry it does not work.

Regards

Rajeev Kumar
SOFTWARE ENGINEER
ARICENT TECHNOLOGIES

--- On Tue, 2/12/08, glassfish@javadesktop.org wrote:

From: glassfish@javadesktop.org
Subject: Re: how to set content type as a CSV file
To: users@glassfish.dev.java.net
Date: Tuesday, 2 December, 2008, 10:26 AM

Please see if this would work

res.setContentType("text/comma-separated-values");

HTH
-Sathyan
[Message sent by forum member 'scatari' (scatari)]

http://forums.java.net/jive/thread.jspa?messageID=319478

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com
[att1.html]