This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Old Struts and content-type/attachments

 
Brett Sanger
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic