tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ParserController.java
Date Thu, 04 Dec 2003 22:57:45 GMT
kinman      2003/12/04 14:57:45

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        ParserController.java
  Log:
  - When a tag file include a file, make sure the included file environment
    maintains the isTag and directiveOnly properties.
  
  Revision  Changes    Path
  1.48      +8 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ParserController.java	1 Dec 2003 19:31:37 -0000	1.47
  +++ ParserController.java	4 Dec 2003 22:57:45 -0000	1.48
  @@ -103,6 +103,8 @@
       private String sourceEnc;
   
       private boolean isDefaultPageEncoding;
  +    private boolean isTagFile;
  +    private boolean directiveOnly;
   
       /*
        * Constructor
  @@ -132,7 +134,8 @@
   	// (using an include directive), ctxt.getTagFileJar() returns the 
   	// JAR file from which to read the tag file or included resource,
   	// respectively.
  -	return parse(inFileName, null, ctxt.getTagFileJarUrl());
  +	return parse(inFileName, null, ctxt.isTagFile(), false,
  +                     ctxt.getTagFileJarUrl());
       }
   
       /**
  @@ -146,7 +149,8 @@
       public Node.Nodes parse(String inFileName, Node parent,
   			    URL jarFileUrl)
   	        throws FileNotFoundException, JasperException, IOException {
  -	return parse(inFileName, parent, ctxt.isTagFile(), false, jarFileUrl);
  +        // For files statically included, keep isTagfile and directiveOnly
  +	return parse(inFileName, parent, isTagFile, directiveOnly, jarFileUrl);
       }
   
       /**
  @@ -187,6 +191,8 @@
   	Node.Nodes parsedPage = null;
   	isEncodingSpecifiedInProlog = false;
   	isDefaultPageEncoding = false;
  +        this.isTagFile = isTagFile;
  +        this.directiveOnly = directiveOnly;
   
   	JarFile jarFile = getJarFile(jarFileUrl);
   	String absFileName = resolveFileName(inFileName);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message