Hello,
i do it similar as described. Additionally I add a header as follows:
response().addHeader("Content-disposition", "attachement; filename=" +
file.getName());
The file will be opened by IE, but in a new session. When looking at my logs
i have 2 requests for a download:
1. From the user who requested the file and has already a session and is
identified
2. The same request in a new session
The
URL:/server/app/control?action=dir_browser_download&user=1&area=download&fil
e=test.xls
Does anyone knows why this happens and how to prevent it
Thanks
Reto
-----Urspr�ngliche Nachricht-----
Von: Danny Angus [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 22. Mai 2002 10:36
An: POI Users List; Ferruccio Spagna
Betreff: RE: POI and JSP
> The only problem is now that IExplorer
> doesn't open Excel automatically (Netscape does), or can I do
> something for
> this? I tried to stream to the client an xls from a servlet that specifies
> the content-type without having better result.
1/ set content-type to "application/x-excel"
2/ make your link end with .xls EG:
http://mysite.com/context/servlet/org.apache.test/x.xls?param=value
This works, M$IE recognises "x.xls" as an excel file, and tomcat will call
org.apache.test.doGet(), and pass in the parameters correctly, to generate
it.
M$IE opens Excel in a COM in-browser process.
You can also use the URL in the File->open dialogue of Excel to open the
generated xls file directly without using IE.
d.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>