> Hi! If I were to send a text file over to the client, what should the
> content type be?
> I've tried "text/plain" but it shows up in the browser, and I don't want
> this. I just want the Save As dialog box to pop up, with the Save As Type
> combobox displaying "Text Document" (I've tried "application/text" but the
> Save As Type displayed Documents).

try this...

response.setHeader("Content-Disposition", "attachment;
filename=\"text.txt\"");
response.setContentType("application/octet-stream");
out.print("hello");

Hope it helps,

Shiraz

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to