You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jiang, Jane (NIH/NCI) [C]" <ji...@mail.nih.gov> on 2007/08/01 20:57:14 UTC

Spring 2.0 Session scope beans

Hi,

I am experimenting with the Session scope beans.  I was able to define
on and verify that one bean is created and associated with each session.

Could I get access to the session from the bean?  I plan to use this
bean to store user information.  I need to get the user id from the
request header and populate this object.  

I can also check from the action and populate the bean if it is not
initialized.  But then I will have to check from many places.

Thanks in advance for your help,

Jane



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


Re: Spring 2.0 Session scope beans

Posted by Chris Pratt <th...@gmail.com>.
Your best bet is to write it as an Interceptor and add it to your
default interceptor stack.
  (*Chris*)

On 8/1/07, Jiang, Jane (NIH/NCI) [C] <ji...@mail.nih.gov> wrote:
> Hi,
>
> I am experimenting with the Session scope beans.  I was able to define
> on and verify that one bean is created and associated with each session.
>
> Could I get access to the session from the bean?  I plan to use this
> bean to store user information.  I need to get the user id from the
> request header and populate this object.
>
> I can also check from the action and populate the bean if it is not
> initialized.  But then I will have to check from many places.
>
> Thanks in advance for your help,
>
> Jane
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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