To make a JSP respond as a CSV download I start the JSP like this:

<%
        response.setContentType("text/csv");
        response.setHeader("Content-Disposition", "attachment;
filename=some-data.csv");
%>

For Word, you probably need this:

<%
        response.setContentType("application/msword");
        response.setHeader("Content-Disposition", "attachment;
filename=my-document.doc");
%>

Peter Hilton
____________________________
LogicaCMG
Kralingseweg 241-249
Postbus 8566
3009AN Rotterdam
The Netherlands
www.logicacmg.com

All opinions expressed are solely those of the author and not of LogicaCMG


-----Original Message-----
From: Mike Parfitt [mailto:[EMAIL PROTECTED]
Sent: 01 December 2003 11:42
To: [EMAIL PROTECTED]
Subject: Setting browser download dialogue box captions and suggesting
file names

[...] When a user clicks on one, a request is made to the server passing in
the ID of the chosen file (Microsoft Word) to be downloaded. [...] The file
is then downloaded to the user's browser (Internet Explorer - V5) but I
cannot find how to influence the caption/contents of the various dialogue
boxes [...]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to