Results 1 to 2 of 2

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

  1. #1
    Join Date
    Feb 2006
    Posts
    14

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

    Hi,

    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.

    Thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    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:
    http://www.ervacon.com/products/swf/tips/tip1.html

    Erwin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •