Re: [Simpleweb-Support] sessions...
Brought to you by:
niallg
From: -=}\\*/{=- <rui...@gm...> - 2012-12-11 21:24:38
|
nice... just like you said...copied the files and added this method to my request: public Session getSession(boolean create) { try { Session s = null; Cookie sc = (sessionNewCookie != null) ? sessionNewCookie : getCookie(sessionId); if (sc != null) { s = sessionProvider.open(sc.getValue(), sessionKeepAlive); if (s != null) return s; } if (create) { String uuid = UUID.randomUUID().toString(); sc = new Cookie(sessionId, uuid, true); s = sessionProvider.open(sc.getValue(), true); reply.getResponse().setCookie(sc); sessionNewCookie = sc; return s; } } catch (LeaseException ex) { logT(ex, "While getting the session."); } return null; } works nice, ty, :) []r. On 10 December 2012 21:18, Niall Gallagher <gal...@ya...>wrote: > Yep, it should be very easy to just copy the package across. I dropped > this package because its not really related to HTTP, and I always found > that I had to implement my own more complicated session handling system > anyway. > > --- On Mon, 10/12/12, -=}\*/{=- <rui...@gm...> wrote: > > > From: -=}\*/{=- <rui...@gm...> > > Subject: [Simpleweb-Support] sessions... > > To: "Simple support and user issues" < > sim...@li...> > > Received: Monday, 10 December, 2012, 12:42 PM > > hi, > > i just upgraded to the newest version and just > > noticed that the session feature has been removed from the > > version i was using. > > the server i'm implementing was using that > > feature. > > > > > > i started to look at the old sources to see if i > > could migrate the code... would it be easy? > > i don't mind implementing my > > own approach to the problem... the thing is that i > > don't know how to detect the same session between > > requests... is it thought cookies? some other way to know if > > is the same client? > > > > > > best wishes, rui > > > > -----Inline Attachment Follows----- > > > > > ------------------------------------------------------------------------------ > > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. > > Free Trial > > Remotely access PCs and mobile devices and provide instant > > support > > Improve your efficiency, and focus on delivering more > > value-add services > > Discover what IT Professionals Know. Rescue delivers > > http://p.sf.net/sfu/logmein_12329d2d > > -----Inline Attachment Follows----- > > > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |