tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r469855 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
Date Wed, 01 Nov 2006 10:59:20 GMT
Author: remm
Date: Wed Nov  1 02:59:20 2006
New Revision: 469855

URL: http://svn.apache.org/viewvc?view=rev&rev=469855
Log:
- For tag files, also put attributes in the wrapped jspContext.

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=469855&r1=469854&r2=469855
==============================================================================
--- 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 Nov  1 02:59:20
2006
@@ -3559,8 +3559,7 @@
             throws JasperException {
 
         if (tagInfo.hasDynamicAttributes()) {
-            out
-                    .printil("private java.util.HashMap _jspx_dynamic_attrs = new java.util.HashMap();");
+            out.printil("private java.util.HashMap _jspx_dynamic_attrs = new java.util.HashMap();");
         }
 
         // Declare attributes
@@ -3619,6 +3618,14 @@
                 out.print(" = ");
                 out.print(attrInfos[i].getName());
                 out.println(";");
+                if (ctxt.isTagFile()) {
+                    // Tag files should also set jspContext attributes
+                    out.printin("jspContext.setAttribute(\"");
+                    out.print(attrInfos[i].getName());
+                    out.print("\", ");
+                    out.print(attrInfos[i].getName());
+                    out.println(");");
+                }
                 out.popIndent();
                 out.printil("}");
                 out.println();



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


Mime
View raw message