Re: restoring session in servlet deployment context
Re: restoring session in servlet deployment context
- Subject: Re: restoring session in servlet deployment context
- From: "Jérémy DE ROYER [INGENCYS]" <email@hidden>
- Date: Wed, 18 Apr 2012 13:24:50 +0200
For those who could have the same issue, here comes one answer :
1) get the jsessionid from the HttpSession used for authentication
2) send both wosid and jsessionid to the direct actions
3) restore HttpSession using an HttpSessionListener
4) restore WOSession using WOServletSessionStore.woSessionFromHttpSession()
5) set session to context() and awake session pin context
That's all.
Jérémy
Le 18 avr. 2012 à 11:46, Jérémy DE ROYER [INGENCYS] a écrit :
> Hello,
>
> We have APIs that use HTTP/GET or POST direct actions according to this scheme :
> - authenticate direct action -> returning a sessionID
> - asking for a direct action with a sessionID -> if authenticated, returning the response
>
> Problem is that it doesn't work with servlet deployment except if using ie, firefox or safari because of the lack of httpSession, used by servlet context to restore the (wo)session.
>
> Problem is that we have developed java tasks or iPhone apps that work with web objects apps sending requests and receiving responses.
>
> But it does not work in a servlet deployment context.
>
> I tried to use WOApplication.application().restoreSessionWithID(sessionId, context()) but no way to restore.
>
> Any idea ?
>
> Jérémy
> _______________________________________________
> 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
_______________________________________________
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