On your doStartTag you create the object you want to store, then use the
implicitly defined pageContext object to store it:
MyBean someBean = ....
....
pageContext.setAttribute("theNameYouExposed", someBean, REQUEST_SCOPE) //or
SESSION_SCOPE or CONTEXT_SCOPE or PAGE_SCOPE
or
pageContext.setAttribute("theNameYouExposed", someBean) to store it in the
page scope
then in the recipient tag you retrieve it with:
pageContext.getAttribute("theNameYouExposed",REQUEST_SCOPE) // or....
or simply pageContext.getAttribute("theNameYouExposed") if it is in page
scope.
Wellington
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 12:47 PM
To: [EMAIL PROTECTED]
Subject: Re: how to quote nested tags
On Thu, Jun 21, 2001 at 12:19:08PM +0200, Lacerda, Wellington (AFIS) wrote:
> In the current spec it is not allowed to use a tag inside another tag.
> If you need to use results from a tag processing in another tag, currently
> you must expose it as a bean in some scope and then access that bean in the
> other tag.
Thanks for the answers, that's what I feared...
Can some give a simple example of how to do the bean stuff mentioned above?
-Felix