Assuming that your dependent upon data that you've put in the session...

The problem I see you having here is that the request to the external
service could take longer than the session timeout on your application
server.  Unless you can guarantee that the turn-around time is going to be
some time increment significantly lower than the timeout, you're going to
have to create a mechanism to persist the session information and rebuild
the session information if a timeout does occur.  Otherwise, upon timeout of
the session, all session level information is lost.

- Dave

-----Original Message-----
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 4:21 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: How to do an outcall but return to the session?


Assuming your client is using cookies this should work automatically.  If
your client has his/her cookies disabled you must make sure to submit a
"re-written" url as the target for "returnTo" processing in your other
system.

-AP_

-----Original Message-----
From: Reid Pinchback [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: How to do an outcall but return to the session?



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.


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to