-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
Hi,
On Tue, 7 Sep 1999, John Preston wrote:
JP| Does anyone know how I can set the name of the filename that comes
JP| up in the "Save As" file window when a servlet returns
JP| "text/tab-separated-values" content.
[...]
JP| retruns the content. When the save as file window appears then
JP| I see the name of the initial servlet as the default name.
The easiest way to do this is to append the filename to the servlet Path.
It is regarded as PathInfo for the servlet but otherwise ignored.
Consider your current servlet beeing
/servlet/FileDownload
now just append the filename in the URL
/servlet/FileDownload/myfile.csv
The browser now assumes to download myfile.csv, but your servlet is called
as usual (with the addition PathInfo you can ignore).
It is possible to set the file in the header somehow, but dumb browsers
ignore this, so this won't be save.
ciao,
-hen
---
Henner Zeller [EMAIL PROTECTED]
PGP pub key [77F75B39]: finger [EMAIL PROTECTED]
If Microsoft is the answer, it must have been a VERY silly question.
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]