• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to stream the bytes of the file from the action?  RSS feed

 
kavin clain
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to stream the bytes of the file from the action?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For S1:

Open a response output stream.
Write the file bytes to it.
Close the stream & flush.
Return null from action.
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Struts 2, use Stream result!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!