Peter --
All that you need to do is get your PageContext, then call getSession()
on that. Then you've got your session and can retrieve stuff from it.
Here's some pseudo-code to explain:
private PageContext pageContext;
public void setPageContext(PageContext pageContext) {
this.pageContext = pageContext;
}
public int doStartTag() throws JspException {
HttpSession session = pageContext.getSession();
Object objTarget = session.getAttribute(target);
return SKIP_BODY;
}
public void release() {
pageContext = null;
}
Hope that helps...
Anne
Peter Giannopoulos wrote:
>
> Hello all,
>
> Can anyone show me an example of accesing a session variable in a custom
> tag?
> Or at least point me towards documentation that explains it?
>
> (I have an object that I store in a session variable, I need to retrieve in
> one of my custom tags)
>
> ----------------------------------------------------------
> Peter Giannopoulos, Software Designer
> Gemplus Software, Advanced Projects Group
>
> Phone: +15147322434
> Fax: +15147322401
> Gemplus Canada Inc., Http://www.gemplus.com
>
> I hear and I forget,
> I see and I remember,
> I do and I understand.
>
> -----------------------------------------------------------