commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly JellyContext.java
Date Wed, 31 Jul 2002 16:14:49 GMT
jstrachan    2002/07/31 09:14:49

  Modified:    jelly/src/java/org/apache/commons/jelly JellyContext.java
  Log:
  patched so that <j:includes> will now correctly change the contextURL so that relative
URIs work inside an included file
  
  Revision  Changes    Path
  1.20      +9 -8      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/JellyContext.java
  
  Index: JellyContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/JellyContext.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JellyContext.java	22 Jul 2002 14:34:09 -0000	1.19
  +++ JellyContext.java	31 Jul 2002 16:14:48 -0000	1.20
  @@ -500,17 +500,18 @@
           Script script = compileScript(url);
           
           URL newJellyContextURL = getJellyContextURL(url);
  -        JellyContext newJellyContext = null;
  -
  +        
  +        JellyContext newJellyContext = new JellyContext(this, newJellyContextURL);
  +        newJellyContext.setExport( export );
  +        newJellyContext.setInherit( inherit );
  +            
           if ( inherit ) {
  -            newJellyContext = this;
  -        } else {
  -            newJellyContext = new JellyContext(this, newJellyContextURL);
  -            newJellyContext.setExport( export );
  -            newJellyContext.setInherit( inherit );
  -        }
  +            // use the same variable scopes
  +            newJellyContext.variables = this.variables;
  +        } 
   
           script.run(newJellyContext, output);
  +        
           return newJellyContext;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message