Hi all,
I need to integrate an external web-based service with a
Struts-based app. The chain of events are:
1. client invokes URL on my app within their current session.
2. My action class gets hit. Sometimes it would immediately
forward to a JSP, but sometimes it must first bounce the user
to the external service before doing the forwarding.
3. When I forward the user to the external service it is by
doing a redirect, and I tell the external service where to send
the user back to by tacking on an appropriately-formatted
query parameter containing the return URL. When the
user submits whatever is required by that service, the
service sends them to that URL (i.e. back where they
came from).
4. When the user gets back, they need to be in the same
http session they were in before being bounced to the
external service. Lots of stuff is bound to their session,
and it would be a bad thing to have lost that context data.
How do I do this in Struts? In particular, if I'm in an Action class
and constructing an ActionForward object to toss the user to
the external service, how do I make sure the session is preserved?
Does that happen automatically via cookie magic, or do I need
to extract a session id from somewhere and tack it on to the
URL for the return? If the latter, how specifically do I do that?
Thanks!
Reid
---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.