I have a flex app that uses AMF to talk to a Spring Java backend. How do I get the values of cookies that have been set by the server and are being sent back by AMF?
As far as I know there's no difference between cookies that are set during AMF request and normal web requests from the browser. So you can access those cookies with a little bit of JavaScript and ExternalInterface.
You can find code on how to do that right here on stackoverflow:
- http://stackoverflow.com/questions/689215/is-it-possible-to-value-store-cookies-in-flash-or-flex
- http://stackoverflow.com/questions/523633/accessing-browser-cookies-from-flex
EDIT: To answer your second question... AMF is not a transport protocol. It's just a binary protocol to transfer data on top of tranport protocols like HTTP or HTTPS. If you take a look at the specifications of AMF0 and AMF3 you won't find any mention of cookies.
So, no AMF doesn't use cookies (it doesn't even know about cookies), but the underlying protocols (HTTP, HTTPS) can use them (for example to exchange session IDs). You can take a look at Wikipedia if you want to know more about HTTP Cookies.