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 TagLibraryInfoImpl.java
Date Fri, 02 Aug 2002 01:19:26 GMT
kinman      2002/08/01 18:19:26

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java
  Log:
  - Allows paths relative to TLD for tag files
  
  Revision  Changes    Path
  1.10      +10 -5     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TagLibraryInfoImpl.java	1 Aug 2002 21:17:58 -0000	1.9
  +++ TagLibraryInfoImpl.java	2 Aug 2002 01:19:26 -0000	1.10
  @@ -286,7 +286,7 @@
               else if ("tag".equals(tname))
                   tagVector.addElement(createTagInfo(element));
               else if ("tag-file".equals(tname))
  -                tagFileVector.addElement(createTagFileInfo(element));
  +                tagFileVector.addElement(createTagFileInfo(element, uri));
               else if ("function".equals(tname))          // JSP2.0
                   functionVector.addElement(createFunctionInfo(element));
               else if ("display-name".equals(tname) ||    // Ignored elements
  @@ -438,7 +438,7 @@
        *
        * @return TagInfo correspoding to tag file directives
        */
  -    private TagFileInfo createTagFileInfo(TreeNode elem)
  +    private TagFileInfo createTagFileInfo(TreeNode elem, String uri)
   	        throws JasperException {
   
   	String name = null;
  @@ -460,6 +460,11 @@
               }
   	}
   
  +        path = path.replace('\\', '/');
  +	if (!path.startsWith("/")) {
  +	    // relative to uri of TLD file
  +            path = uri.substring(0, uri.lastIndexOf("/") + 1) + path;
  +	}
   	TagInfo tagInfo = TagFileProcessor.parseTagFile(parserController,
   							name, path,
   							this);
  
  
  

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


Mime
View raw message