You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2006/11/01 11:59:20 UTC

svn commit: r469855 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java

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