aspose file tools*
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
Author

outputting zip file

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 214
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 ??

thanks
Ravi
olivier dutranoit
Ranch Hand

Joined: Aug 20, 2011
Posts: 81

for creating zips, try using

import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: outputting zip file
 
Similar Threads
can some .zip files (not java classes) be included in WEB-INF/classes too ?
Looking for correct data type to take in stream of xml
add zip or jars to classpath
can't use reset on input stream?
JDOM alternative JAR file required