You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Robert L. Grzywinski" <ro...@outlook.net> on 2000/01/21 20:02:51 UTC

Question about VariableInfo.getDeclare() = false

If VariableInfo.getDeclare() is true then
TagGeneratorBase.declareVariables() outputs:

	<class> <var name> = null;

but if VariableInfo.getDeclare() is false then nothing is output.  (The
spec doesn't seem to go either way on this, but) If getDeclare() is false
then that implies that the variable is already declared (and may have a
value).  If it is already declared, then shouldn't there be a
pageContext.setAttribute(...) so that a tag can read its (possible) value?
In the case that getDecalre() is true, it's implied that the value is
null, so it's not necessary to have a pageContext.setAttribute(...), but
it wouldn't hurt.  Again, the spec doesn't say that the variable shouldn't
be readable within the tag, but it doesn't exactly say that it should be
either.

Rob Grzywinski
rob@outlook.net