jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: using pageContext.getAttribute within TagExtraInfoClass
Date Thu, 13 Jun 2002 20:53:52 GMT
On Thu, 13 Jun 2002 vnikore@ca.ibm.com wrote:

> Hi,
> I'm trying to use pageContext.getAttribute while implementing  the
> TagExtraInfoClass.

You're asking for the impossible.  :-)  TagExtraInfo classes run a
translation time; there isn't a PageContext object until request
time.  That is, TEI classes run when the container translates a JSP page
into a servlet; it's not until the page runs that a PageContext is

> What I'm trying to do is declare a new scripting variable only if a
> variable with the same name hasn't been created, otherwise override
> the existing value fo the variable.  Essentially I want to be able to
> toggle the VariableInfo's "declare" parameter between true and false
> depending on if the variable exists.

This can't easily be done.  One more reason not to like scripting
variables.  :-)

Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com
(coming in July 2002 from Manning Publications)

To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>

View raw message