File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to zip a file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to zip a file?" Watch "How to zip a file?" New topic
Author

How to zip a file?

kv ruby
Ranch Hand

Joined: Jul 23, 2009
Posts: 38
My requirement is to zip a file placed in my D:\folder and send it back to the user via out.write.
how can i do this in servlet?


Regards, ruby kv
rubyshiv.blogspot.com
mahesh shinde
Ranch Hand

Joined: Jul 24, 2009
Posts: 69

Very easy in java
You can use java.util.zip classes for creating a zip file
like ZipOutputStream also you can provide some CRC check to your zip file.
kv ruby
Ranch Hand

Joined: Jul 23, 2009
Posts: 38
mahesh shinde wrote:Very easy in java
You can use java.util.zip classes for creating a zip file
like ZipOutputStream also you can provide some CRC check to your zip file.



Thanks mahesh.
actualy client is a mobile and was not getting the response properly.
seems like device issue , its resolved.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to zip a file?
 
Similar Threads
How to I know the my URLyBird version?
Not Suitable Driver Error
zipping as self extracting exe
Tomcat
How to write zip files into another zip file..?