Ah in the examples I of course meant
eg request.getSession().getAttribute("userinfo");
and eg request.getSession().setAttribute("userinfo", userinfo);
Sorry I need more caffeine,
or more sleep, Menno
06/04/2001 17:13:12, Menno M Jansz <[EMAIL PROTECTED]> wrote:
>To access EJBs in your Action do a GetAttribute on the HttpSession ( eg
>request.getSession().getAttribute("userinfo"); ).
>
>1. If the return is null then this indicates it is the first time for this
>HttpSession, so do a lookup for the relevant ejb. When you
>have a reference to it do a SetAttribute on the HttpSession (eg
>request.getSession().setAttribute("servers", servers); )
>2. If the return is not null you have the reference to the ejb.
>
>Note the key here is that every client/user has has a unique HttpSession associated
>with it, via a unique session id. I think
>that's what you are getting confused about. So you can use to this HttpSession to
>store information for this user which you
can
>access across more than one page request.
>
>Hope that helps,
>
>Menno
>
>
>05/04/2001 13:26:03, "G.L. Grobe" <[EMAIL PROTECTED]> wrote:
>
>
>>If the life-span of an Action is only when that Action is being exec'd, and
>>I've created my session bean in this Action, and since this Action's
>>ActionForm class spans multiple pages, how do I grab the reference to that
>>session bean the next time that Action is exec'd? It seems a little odd to
>>have to give unique names to a setAttribute method (as any number of users
>>could jump on) and was wondering how else this might be done.
>>
>>Any help much appreciated.
>>
>
>
>