Announcement Announcement Module
No announcement yet.
Stream byte[] from a web-flow action or MVC controller Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stream byte[] from a web-flow action or MVC controller


    I have a service that returns a byte[] of a generated photo and I would like to stream this to the client. E.g. I want the client to invoke an action/controller using the img markup tag (<img src="http://myhost/getPhoto?guid=xxxx" />) and this should stream the byte[] to the client. How should I achieve this in Web-Flow? Should I use a pure Spring MVC controller for this? In that case, how do I hook this controller into the DispatcherServlet used by web-flow? (I'm using the schema based approach to declare the web-flow stuff in xml). I also need something similar that works in a Portlet environment.


  • #2
    Is that image data stored inside the flow execution (e.g. in flow scope)?

    If so, the best approach is probably to code a seperate controller (Normal Spring MVC controller) to stream it to the client. The controller can get access to the flow execution like described in this tip: