From cf357715abaadc2379b216d1ce354af820da9ecc Mon Sep 17 00:00:00 2001 From: remm Date: Wed, 1 Nov 2006 10:59:20 +0000 Subject: [PATCH] - 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 --- java/org/apache/jasper/compiler/Generator.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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(); -- 2.11.0