RE: Changing context(tool.session) object

Sheldon Ross <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.user
Message-ID <[email protected]>
I tried that and it didn't seem to work. I ended up just putting the object in SessionData when the user logs in.

ie:
tool.session.sessionData=org.apache.turbine.services.pull.util.SessionData

It seems to work well and seems to just be an implementation of HashMap.

Thanks!

> Subject: RE: Changing context(tool.session) object
> Date: Wed, 4 Feb 2009 09:05:47 -0600
> From: [email protected]
> To: [email protected]
> 
> data.getSession().setAttribute("MYTAG", myObj);
> data.getSession().getAttribute("MYTAG");
> 
> 
> Tony 
> 
> -----Original Message-----
> From: Sheldon Ross [mailto:[email protected]] 
> Sent: Tuesday, February 03, 2009 4:58 PM
> To: [email protected]
> Subject: Changing context(tool.session) object
> 
> 
> I have used session tools before, but normally I can use the tool I put
> in session. 
> In this case, I want to overwrite the tool, and keep it across the
> session, is there a way to do this?
> 
> ex: TurbineResources prop
> 
> tool.session.myObj = org.myapp.taglibs.Obj
> 
> 
> Code:
> 
> Obj obj = (Obj)context.get("myObj");
> obj = new Obj();
> 
> This doesn't seem to work because it doesn't actually change the
> session's reference? 
> Or am I doing something wrong. Is there a better way to keep an object
> persistent in a session?
> 
> Thanks alot,
> 
> Sheldon Ross
> 
> _________________________________________________________________
> Windows Live(tm) Hotmail(r):...more than just e-mail. 
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_exp
> lore_012009
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

_________________________________________________________________
Windows Live™: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_022009
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.