| Author |
download file using OutputStream from Servlets
|
ahmed yehia
Ranch Hand
Joined: Apr 22, 2006
Posts: 424
|
|
I want to download a file from a web app using a Servlet and then save the file with its original name and extension, currently Im using ServletOutStream to write data to the response. The file was successfully downloaded but it's got the Servlet name from which it came from. I think that could be normal to not identify the file or its extension cause the Servlet is just writing bytes to the stream. here is the code I use in Servlet:
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56223
|
|
|
Look up the content-disposition response header.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
ahmed yehia
Ranch Hand
Joined: Apr 22, 2006
Posts: 424
|
|
|
Thanks Bear Bibeault, it does what I wanted to do.
|
 |
 |
|
|
subject: download file using OutputStream from Servlets
|
|
|