Re: [S2] Struts Showcase File Download

2007-03-21 Thread Brian Thompson
After looking in the *source code* of the Struts showcase, I got the idea to declare an action with a return type of "stream" and use a method like public InputStream retrieveImage() throws Exception { return ServletActionContext.getServletContext ().getResourceAsStream("images/403.jpg"); } How

[S2] Struts Showcase File Download

2007-03-21 Thread Brian Thompson
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 tryin