Actually, you did put your attribute in the session context. The
findAttribute(String) method of the page context searches all the context
(first page, then request, then session, then application) for your
attribute. The alternative is the getAttribute(String) method of each
scope, which only searches that scope. In your case:
String organizationId =
session.getAttribute("organizationsBean").getColumn("ORGANIZATIONID");
Using getAttribute is probably more efficient, but if you're designing
tags, findAttribute is more convenient. I think that if you don't specify
a scope in getProperty, it uses the same logic as findAttribute.
- Morgan
On Tue, 24 Apr 2001, Dave Newton wrote:
> Hola,
>
> >> [...] This new tag needs to be able to make an object available as a
> scripting variable. [...]
> > String organizationId =
> pageContext.findAttribute("organizationsBean").getColumn("ORGANIZATIONID");
>
> As a relative servlet/JSP newbie, I'm wondering why it would be better
> to put things in the pageContext rather than directly in the request
> or session or whatever.
>
> Thanks,
> Dave
>
>