Bug 12333 - ELParser too greedy while consuming '$' characters
Summary: ELParser too greedy while consuming '$' characters
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
Depends on:
Reported: 2002-09-05 14:01 UTC by Henrik J
Modified: 2004-11-16 19:05 UTC (History)
0 users


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: 

But instead I get:

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

Correctly outputs:

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.