Title: RE: saving a file on client's machine using servlets
Jay,
 
Your idea is working well. But is there anyway to give the default extension to be as ".txt". No default extension appears now. File types are "document" and "All files".
 
thanks in advance,
Lakshmi
-----Original Message-----
From: Burgess, Jay [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 05, 2001 3:55 PM
To: '[EMAIL PROTECTED]'
Subject: RE: saving a file on client's machine using servlets

I believe one solution is to POST the form data from the text area to you servlet, then return it right back, but with an unknown MIME type.  Typically, browsers give you the option to "Save to Disk" when they encounter an unknown MIME type. To set the MIME type on the response, simply call "res.setContentType(type);", where "type" is something unknown like "lakshmi/post".

Passing this data back and forth doesn't seem to be the most efficient solution, though, so I'm interested to see if there are others.

Jay

-----Original Message-----
From: Adilakshmi Lingam [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 05, 2001 3:57 PM
To: [EMAIL PROTECTED]
Subject: saving a file on client's machine using servlets


Hi,
I have a small development question in servlets.
If a user clicks on a button in a web page(servlet generated), a dialog box
should appear asking him the location to save the content. and the contents
of a text area in the web page have to be store in a file on the client's
machine.
Any ideas please,
Thanks,
Lakshmi









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

Reply via email to