Caldarale, Charles R wrote:
>> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
>> Subject: RE: Update to 6.0.20: deferred EL expressions
>>
>> I've verified your observations by fiddling with one of the 
>> JSP examples that come with Tomcat; it does seem like a bug
>> in 6.0.20 at this point.  Will need to do some more digging.
> 
> I've patched org/apache/jasper/compiler/Generator.java to produce the same 
> behavior in 6.0.20 as was available in 6.0.18, at least for my test case.  I 
> can't say I'm happy with the fix, since I don't understand why it's needed; 
> something else that I haven't found has changed, so this is really just 
> addressing the symptom, not the underlying cause.  If you file a bug report, 
> I suspect Mark T will be able to prepare a better fix.

Just followed through the source code and found a handy comment (yes they really
do exist) pointing me towards section JSP.2.2 of the JSP spec. This makes it
clear that #{...} is not allowed in template text so unless I am mis-reading
your original example you are trying to use #{...} in template text so that is
not permitted by the spec. That it working prior to 6.0.20 appears to be a
side-effect of the bug fix Chuck already identified.

What does seem wrong is that JSP.2.2 requires a translation error is you use
#{...} in template text and that doesn't seem to be happening. That is worth
creating a bug for, so please go ahead so it doesn't get forgotten about.

Mark

> 
> If the attachment doesn't make it through, here's the change, lines 962-967:
> 
> old code:
>             if (!pageInfo.isELIgnored() && (n.getEL() != null)) {
>                 out.printil("out.write("
>                         + JspUtil.interpreterCall(this.isTagFile, n.getType() 
> + "{"
>                                 + new String(n.getText()) + "}", String.class,
>                                 n.getEL().getMapName(), false) + ");");
>             } else {
> 
> new code:
>             if (!pageInfo.isELIgnored() && (n.getEL() != null || n.getType() 
> == '#')) {
>                 out.printil("out.write("
>                         + JspUtil.interpreterCall(this.isTagFile, n.getType() 
> + "{"
>                                 + new String(n.getText()) + "}", String.class,
>                                 n.getType() == '#' ? "null" : 
> n.getEL().getMapName(), false) + ");");
>             } else {
> 
> Only lines 962 and 966 were changed; the others are provided for context.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to