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