Hello:

 

I started writing a Struts 2 action which zips up the contents of a
directory on the filesystem and downloads it.  Everything was fine until
I discovered that java.util.zip.ZipOutputStream requires an OutputStream
in its constructor.  It doesn't seem like a good idea to get a reference
to the ServletOutputStream in my action and then use StreamResult later
on (if that is even necessary).  On the other hand, I could do the
zipping within a custom result but this also seems inappropriate.  The
ideal solution would be to have a custom result which somehow receives
from the action some type of object which contains Files in a tree
hierarchy.  I don't know, I'm new to Struts 2 so any feedback on this
matter would be appreciated.

 

Regards,

Eric Hamacher

 

******************************

THIS EMAIL IS INTENDED ONLY FOR THE REVIEW OF THE ADDRESSEE(S), AND MAY
CONTAIN CONFIDENTIAL AND LEGALLY PRIVILEGED INFORMATION. INTERCEPTION,
COPYING, DISSEMINATION, OR OTHER USE BY OTHER THAN THE ADDRESSEE(S) IS
PROHIBITED AND MAY BE PENALIZED UNDER APPLICABLE PRIVACY LAWS. IF YOU
RECEIVED THIS EMAIL IN ERROR, PLEASE DELETE IT AND NOTIFY ME BY RETURN
EMAIL TO [EMAIL PROTECTED] *******************************

 

Reply via email to