Bug 12333 - ELParser too greedy while consuming '$' characters
Summary: ELParser too greedy while consuming '$' characters
Status: CLOSED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-05 14:01 UTC by Henrik J
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik J 2002-09-05 14:01:42 UTC
If I use a bean named foo, with a property named bar initialized to "BAR" I 
would expect that:
<c:out value="$${foo.bar}"/> 

Would output: 
$BAR

But instead I get:
$${foo.bar}

The problem seems to be that the ELEvaluator is too greedy on consuming pairs 
of '$$', since:
<c:out value="$$${foo.bar}"/> 

Correctly outputs:
$$BAR

Ofcourse as a user I could use the obvious workaround ${'$'}, but I believe the 
problem needs to be solved, since the specification states that only '${' 
sequences needs special treatment.
Comment 1 Shawn Bayern 2002-09-05 16:40:22 UTC
Indeed, I think it's a bug and that your characterization is correct.  I'll 
post a fix once I regression-test it.
Comment 2 Shawn Bayern 2002-10-14 00:51:03 UTC
Thanks again for this report, and sorry for the delay.  This bug has been fixed 
and the regression tests updated to ensure that it stays fixed.  See version 
1.0.2 for a final release that includes this fix.