struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mon Cab <futo...@yahoo.com>
Subject Re: getting Session from SessionId
Date Sat, 10 Feb 2007 20:34:43 GMT

I think its going to have to be solution 1.  All Im really interested
in is user data associated with a session, so I'll probably map userId
to sessionID in the DB and then pull user info when the service sends
me a session id.    

I like the idea of the session map though.  Maybe use a singleton to
store the map and then access the sessions from there.  Why do you say
this might not be a good idea?



--- "Frank W. Zammetti" <fzlists@omnytex.com> wrote:

> Mon Cab wrote:
> > Im guessing that this might require my storing the sessionId's in
> the
> > db when the users log on.  Such a shame.  
> 
> I think even doing that it wouldn't be possible to get the session 
> object itself... I seem to recall there being some security
> restrictions 
> around that (which makes sense if you think about it)... IIRC, that's
> 
> also the reason that getSession() method was removed in the first
> place.
> 
> If the information in session is all your actually interested in
> though, 
> and not the session object itself, you could certainly get away with 
> throwing a filter in front of your app that grabs session from the 
> request and pulls the pertinent info from it and shoves it in a 
> database, keyed by session ID (or whatever else makes sense). 
> Obviously 
> a performance concern, not to mention the security implications, but 
> would certainly work.
> 
> I suppose you could try stuffing a reference to the session object 
> itself into some map, although I'm not at all sure that'd work... I'm
> 
> more sure though that it wouldn't be spec-compliant, and probably not
> a 
> good idea for other reasons besides :)  Still, might be doable, you'd
> 
> have to test the theory.
> 
> Frank
> 
> 
> > 
> > --- "Frank W. Zammetti" <fzlists@omnytex.com> wrote:
> > 
> >> Hi,
> >>
> >> I don't believe there is a container-neutral way to do this, I
> think
> >> any 
> >> solution would have to be dependent on what app server your
> running
> >> on 
> >> and something specific to it.
> >>
> >> Frank
> >>
> >> (P.S. - I could be wrong! LOL)
> >>
> >> Mon Cab wrote:
> >>> I am trying to integrate a web application to an external
> service,
> >> and
> >>> need to be able to take an incoming sessionId from the external
> >>> service server, and to return details from the session to which
> >> that
> >>> sessionId applies.  
> >>>  
> >>> I understand that there was a getSession(String sessionid)
> method,
> >> in
> >>> HttpSessionContext which has since been deprecated.
> >>>  
> >>> Does anyone know how I would do this, with the Servlet 2.3 APIs?
> >>>  
> >>>   
> >>>
> >>>
> >>>
> >>>  
> >>>
> >
>
____________________________________________________________________________________
> >>> The fish are biting. 
> >>> Get more visitors on your site using Yahoo! Search Marketing.
> >>> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>>
> >>>
> >> -- 
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >> AIM/Yahoo: fzammetti
> >> MSN: fzammetti@hotmail.com
> >> Author of "Practical Ajax Projects With Java Technology"
> >>   (2006, Apress, ISBN 1-59059-695-1)
> >> Java Web Parts - http://javawebparts.sourceforge.net
> >>   Supplying the wheel, so you don't have to reinvent it!
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> > 
> > 
> > 
> >  
> >
>
____________________________________________________________________________________
> > Looking for earth-friendly autos? 
> > Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
> > http://autos.yahoo.com/green_center/
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> > 
> > 
> > 
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Author of "Practical Ajax Projects With Java Technology"
>   (2006, Apress, ISBN 1-59059-695-1)
> Java Web Parts - http://javawebparts.sourceforge.net
>   Supplying the wheel, so you don't have to reinvent it!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message