You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Bill Keese <bi...@tech.beacon-it.co.jp> on 2003/06/06 03:55:32 UTC

[jelly] PATCH - threads / context not set

This fixes the bug where the context variable is not accessible from
threads.  Inside a <threads:thread> call you can't do things like
${context.getVariable(foo)}

init() correctly sets the "context" variable, but it is erased by the
setVariables() call.  So I think this (or something similar) is an
appropriate fix.

Bill

Index: JellyContext.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons/jelly/src/java/org/apache/commons/jelly/Jell
yContext.java,v
retrieving revision 1.42
diff -u -r1.42 JellyContext.java
--- JellyContext.java 7 Mar 2003 13:17:54 -0000 1.42
+++ JellyContext.java 6 Jun 2003 01:53:19 -0000
@@ -324,6 +324,7 @@

     public void setVariables(Map variables) {
         this.variables = variables;
+        this.variables.put("context", this);
     }

     /**