aspose file tools*
The moose likes Struts and the fly likes Old Struts and content-type/attachments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Old Struts and content-type/attachments" Watch "Old Struts and content-type/attachments" New topic
Author

Old Struts and content-type/attachments

Brett Sanger
Greenhorn

Joined: Jul 26, 2006
Posts: 7
I've got a case where I need to have a website offer a "download results" link (i.e. return non-html dynamically created data). Normally I'd just used a DownloadAction, but the company is using Struts 1.1 (I know) and that feature doesn't exist.

My google-fu has failed me. How did people do this prior to Struts 1.2?

Thanks in advance
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just do it the same way you would do it from a Servlet: Set the headers, Get the output stream from the HTTPServletResponse object and write your data to it. Then just return a null ActionForward from your execute method.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Old Struts and content-type/attachments
 
Similar Threads
struts
good book for STRUTS.
How to Download XML file from database?
Double Iteration
Basic jars and Plugins to run struts application