-
May 9th, 2007, 03:07 AM
#1
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
-
May 21st, 2007, 03:50 AM
#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:
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
-
Forum Rules