Re: Servlet HttpSession in webobjects?
Re: Servlet HttpSession in webobjects?
- Subject: Re: Servlet HttpSession in webobjects?
- From: Chuck Hill <email@hidden>
- Date: Tue, 12 Feb 2008 21:50:43 -0800
I agree. If you don't see what you want there, and can't get changes
in the app, then you are out of luck. But my guess is that it passes
the session ID somehow. Now, it is some custom value you are after,
then Mike's answer is your bad news.
Chuck
On Feb 12, 2008, at 9:47 PM, Lachlan Deck wrote:
No - I think the answer was (from Chuck) to log out the request as
it comes in and see what headers/formValues you receive and go from
there.
On 13/02/2008, at 4:45 PM, Jeff Schmitz wrote:
What you most likely want to do is call your DA and manually pass
the session ID as a query parameter, for instance:
The trouble is, I have no control over this. The session ID gets
passed as it gets passed, nothing I can do about it I don't think
because it's not my app. I just give it the link, and it decides
how the session ID is passed. That being the case, looks like the
answer is I'm out of luck, right?
Thanks,
Jeff
On Feb 12, 2008, at 11:26 PM, Mike Schrag wrote:
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:
http://yourhost.com/cgi-bin/WebObjects/YourApp.woa/wa/
yourDirectAction?otherj2eeAppSession=xyz
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:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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