-----Original Message-----
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 5:37 AM
To: [EMAIL PROTECTED]
Subject: Re: ZipOutputStream issues
I wrote just such a utility last fall (some on this list may remember my
vexation at not being able to find code examples); send me a reminder at my
private email address ([EMAIL PROTECTED]) and I'll send you the source code
when I get home (around 7 EST).
Mark
-----Original Message-----
From: Michael Weller [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 7:26 AM
To: [EMAIL PROTECTED]
Subject: Re: ZipOutputStream issues
hi!
Am 19.03.2002 03:24:45, schrieb Robert Koberg <[EMAIL PROTECTED]>:
>Hi,
>
>I am trying to write a Zip file to the servlet's OutputStream. It sends
>the zip to the client, but I have a couple of problems that I can't find
>the solution:
>
>1. Is there a way I can set the filename so when the user saves it on
>windows it will have the .zip extension?
> -- this is a zip of an entire site, not a single page to display on the
>client
you need to set headers:
response.setContentType("application/x-myfile");
response.setHeader("Content-Disposition","attachment;filename=download.txt")
;
for further information, please search the archives, this has been asked a
lot times before.1
>2. Is there a way to set the path in the zip entry?
> -- I am using getRealPath to find the file (directory, actually, which
>recurses to find everything to enter into to the zip)
> -- I want to have the path set to the realative path that I want.
>
check out the Java Tutorial (you can simply find it on java.sun.com) or ask
at an appropriate mailing list.
-mw
>thanks for any advice,
>-Rob
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
