You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Shah Amit <am...@hotmail.com> on 2005/06/02 16:16:03 UTC

J2 - Sending Binary data to browser

Hi all,

Basically I need to present a zip file to the client browser when the clicks 
the submit button on a form.

I am using Jetspeed 2 with Struts-Bridge. There have been one or two threads 
on this forum before related to the same problem, but I was not able to find 
solution so I am posting the question again and asking my questions and 
problems. Sorry for that.

Portlet specs have limitation that portlet are not supposed to modify the 
response header. So I have another servlet sitting in my web-application 
that I would have to redirect to, and that servlet would present the file to 
the browser.

Now the problem that I have is, since I am using struts-bridge, how do I 
redirect to that servlet ... Should I do it in the struts-config.xml via an 
action ?? If yes, the problem is, the file name is generated on the fly and 
I need to pass that every time to the servlet so that it can download that 
file ...

Another way that I can think of is, do a response.sendRedirect() from the 
action itself. But that seems awkward to me, and I dont even know if that 
would work ...

Pardon if the questions are stupid !!

Thanks,

Amit



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org