tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r453023 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
Date Wed, 04 Oct 2006 21:02:16 GMT
Author: remm
Date: Wed Oct  4 14:02:16 2006
New Revision: 453023

URL: http://svn.apache.org/viewvc?view=rev&rev=453023
Log:
- Fix non deferred attributes evaluation.
- Headache inducing patch submitted by Stan Silvert.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java?view=diff&rev=453023&r1=453022&r2=453023
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java Wed Oct  4 14:02:16
2006
@@ -2817,6 +2817,24 @@
                     sb.append(',');
                     sb.append(returnType);
                     sb.append("))");
+                    // should the expression be evaluated before passing to
+                    // the setter?
+                    boolean evaluate = false;
+                    if (tai.canBeRequestTime()) {
+                        evaluate = true; // JSP.2.3.2
+                    }
+                    if (attr.isDeferredInput()) {
+                        evaluate = false; // JSP.2.3.3
+                    }
+                    if (attr.isDeferredInput() && tai.canBeRequestTime()) {
+                        evaluate = !attrValue.contains("#{"); // JSP.2.3.5
+                    }
+                    if (evaluate) {
+                        sb.append(".getValue(");
+                        sb.append(getJspContextVar());
+                        sb.append(".getELContext()");
+                        sb.append(")");
+                    } 
                     attrValue = sb.toString();
                 } else if (attr.isDeferredMethodInput()
                         || MethodExpression.class.getName().equals(type)) {



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


Mime
View raw message