I am trying to retrieve zip file from FTP, unzip it, and get xml file and image file from them and parse the xml, display the contents of xml and image.
byte[] image = ftpClientService.getThumbnailInZip(customer.ftpUser,
customer.ftpPassword, customer.ftpHost, customer.ftpToWrapDirectory,
fileName)
FileOutputStream fos1 = new FileOutputStream("zip.img")
try {
fos1.write(image);
} finally {
fos1.close();
}
return [
command: this,
fileName: fileName,
applicationName: applicationName,
contentProvider: contentProvider,
operatingSystem: operatingSystem,
handSets: handSets,
zipImg:"zip.img" ]
I could finish the xml part successfully and image also I am able to retrieve from the zip in a byte format( i could convert it to a file using file outputstream),
Now I am stuck in sending the image to gsp and to display that. Any inputs are much appreciated.
Thanks