tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cost...@covalent.net
Subject Re: Jasper2: serious problem with tag declarations
Date Thu, 27 Jun 2002 03:37:55 GMT
On Wed, 26 Jun 2002, Kin-Man Chung wrote:

> That's true, but the value of those variables are still synchronized
> with the corresponding pageContext attributes at the locations
> specified by the spec, so using these variables before they are
> synchronized is meaningless.
> 
> The spec as is today really cannot be implemented correctly in Java.
> What we are doing is let pages that conform to the spec
> (e.g. referencing an AT_END variable after end of tag) be compiled
> and run correctly, but does not prevent people from writing page that
> is not spec conformant (e.g. referencing an AT_END variables in the
> body).

What if the type of the variable is not Object ? Then any valid
variable with that name and NESTED scope will no longer work.

The current solution is very counter-intuitive and against very common
patterns in programming ( since the 'block' is usually limiting the scope 
of a variable). If the spec is unclear or broken, the behavior
of jasper1 should be preserved. 

Maybe someone could take a look at other jsp implementations ( resin,
etc ) and see how they deal with AT_END. If all are consistently
doing what jasper1 is - i.e. declare it after the tag, with the 
implicit limit on visibility of the embedding tags - then the spec 
should be clarified / fixed. 

No spec is perfect - and if the price of implementing this 'corectly'
is braking compatibility and having a different behavior on different
containers - maybe it's not worth it. 

I think declaring the AT_END variables at the beginning is not
a very good idea. 

Costin


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


Mime
View raw message