HI there. Although i have not asked this question but i would really like to see some sample code
Raj ============== 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 ------------------------------------------------------------------- The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged. If you are not the addressee of this e-mail you should not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please notify us by telephone or e-mail the sender by replying to this message, and then delete this e-mail and other copies of it from your computer system. Thank you. We reserve the right to monitor all e-mail communications through our network. ___________________________________________________________________________ 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
