Fix parsing bug spotted when reviewing r907538
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Feb 2010 01:06:01 +0000 (01:06 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Feb 2010 01:06:01 +0000 (01:06 +0000)
Allowing #{} expressions to be parsed even when they are disabled breaks ${} expressions if they are intermixed with them. See the testcase added in r907860, r907862.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@907864 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Parser.java

index dcef0fb..3955859 100644 (file)
@@ -1415,7 +1415,9 @@ class Parser implements TagConstants {
             parseXMLTemplateText(parent);
         } else if (!pageInfo.isELIgnored() && reader.matches("${")) {
             parseELExpression(parent, '$');
-        } else if (!pageInfo.isELIgnored() && reader.matches("#{")) {
+        } else if (!pageInfo.isELIgnored()
+                && !pageInfo.isDeferredSyntaxAllowedAsLiteral()
+                && reader.matches("#{")) {
             parseELExpression(parent, '#');
         } else if (reader.matches("<jsp:")) {
             parseStandardAction(parent);