Re: Servlet HttpSession in webobjects?
Re: Servlet HttpSession in webobjects?
- Subject: Re: Servlet HttpSession in webobjects?
- From: Mike Schrag <email@hidden>
- Date: Wed, 13 Feb 2008 00:26:46 -0500
It is going to be sending a session identifier. This is going to be either in the form values or in the HTTP headers. I don't see it in the URL, so I'm guessing it must come over as a form variable. If so, using my last e-mail as an example j2ee equivalent of what I want to do, i.e.:
String sessionKey = (String) session.getAttribute("otherj2eeAppSession");
should I be able to get it simply by doing:
String sessionKey = (String) this.request().formValueForKey("otherj2eeAppSession");
1) If you're calling session.getAttribute("otherj2eeAppSession") in your j2ee app to get this value, there's no way to get this value from your WO app. A session attribute is a key-value pair _inside_ of an HttpSession, which you don't have (and cannot get without literally serializing the session and sending it over in some custom way).
2) The only thing you can possibly get is one of: 2a) a form parameter that you manually pass to your DA as a query string parameter 2b) a form parameter that you manually pass to your DA via a post parameter 2c) a cookie value provided both of your apps are on the same host and the cookie is configured at the root
What you most likely want to do is call your DA and manually pass the session ID as a query parameter, for instance:
at which point, yes you could call request().stringFormValueForKey("otherj2eeAppSession") and get the value.
ms |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden