Re: restoring session in servlet deployment context
Re: restoring session in servlet deployment context
- Subject: Re: restoring session in servlet deployment context
- From: "Ruenagel, Frank" <email@hidden>
- Date: Wed, 18 Apr 2012 15:03:30 +0200
- Thread-topic: Re: restoring session in servlet deployment context
That's interesting.
Normally the JSESSIONID is stored in a cookie.
I guess in your special scenario cookies are disabled and so the tomcat always opens a new session in subsequent requests?
Regards
Frank
-----Ursprüngliche Nachricht-----
Von: webobjects-dev-bounces+webobjects=email@hidden [mailto:webobjects-dev-bounces+webobjects=email@hidden] Im Auftrag von "Jérémy DE ROYER [INGENCYS]"
Bereitgestellt: Mittwoch, 18. April 2012 13:25
Bereitgestellt in: WebObjects
Unterhaltung: restoring session in servlet deployment context
Betreff: Re: restoring session in servlet deployment context
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
_______________________________________________
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