From: remm Date: Wed, 1 Nov 2006 10:59:20 +0000 (+0000) Subject: - For tag files, also put attributes in the wrapped jspContext. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cf357715abaadc2379b216d1ce354af820da9ecc;p=tomcat7.0 - For tag files, also put attributes in the wrapped jspContext. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@469855 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index 9aa9ed0ab..bcf0504aa 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -3559,8 +3559,7 @@ class Generator { 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 @@ class Generator { 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();