| Author |
Sending a ZIP file in Servlet response
|
trupti nigam
Ranch Hand
Joined: Jun 21, 2001
Posts: 602
|
|
In my module, I create a file, then ZIp it. I want to send this zipped file in servlet response.
Here is what I do in my code.
public static final String DEFAULT_CONTENT_TYPE = "application/octet-stream";
public static final int LENGTH_OF_ZIPDATA = 2048;
How do I send the ZipOutputStream in the response. The way I am sending it is incorrect cause converting it to string will not help in this case. I am not sure how to achieve this. Need some pointers.
Thanks,
Trupti
|
 |
trupti nigam
Ranch Hand
Joined: Jun 21, 2001
Posts: 602
|
|
I think I got the answer to my above question. This is how I achieved it.
thanks,
Trupti
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56162
|
|
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.
You can go back and change your post to add code tags by clicking the button on your post.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Sending a ZIP file in Servlet response
|
|
|