Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[S2] Struts Showcase File Download

Brian Thompson

2007-03-21

Replies:

I'm trying to return a stream of binary data (like the image or .zip example
on http://www.planetstruts.org/struts2-showcase/filedownload/index.jsp) from
a Struts 2 action class, but I'm not sure how to configure my application to
get Struts to write the data directly to the response without trying to
route it through a jsp.

http://www.planetstruts.org/struts2-showcase/viewSource.action?page=/filedownload/index.jspseems
like it should do the trick, but it's missing the 2/3 of the
documentation that I need (the Action class source and the configuration).

Has anyone had any luck in getting this kind of behavior out of Struts 2?

-Brian
©2008 junlu.com - Jax Systems, LLC, U.S.A.