File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes outputting zip file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "outputting zip file " Watch "outputting zip file " New topic

outputting zip file

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 234
Hi ....
i am new to file IO ... and
i want to output zip file containg one or more xml files in zip through servet

i am creating multiple JDOM Document objects and i need to put all files into ZIP ..

ServletOutputStream outX = res.getOutputStream();

// outX.write(); this method takes bytes as input i dont know how should i input my JDOM object to this method

anyidea ??

olivier dutranoit
Ranch Hand

Joined: Aug 20, 2011
Posts: 81

for creating zips, try using


I agree. Here's the link:
subject: outputting zip file
It's not a secret anymore!