luehe       2002/12/12 09:44:38

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java
               jasper2/src/share/org/apache/jasper/resources
                        messages.properties
  Log:
  Removed support for tag file paths relative to TLD, until they are
  supported by the spec.
  Tag file paths must start with "/WEB-INF/tags" or "/META-INF/tags".
  
  Revision  Changes    Path
  1.28      +6 -13     
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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- TagLibraryInfoImpl.java   28 Nov 2002 04:18:08 -0000      1.27
  +++ TagLibraryInfoImpl.java   12 Dec 2002 17:44:38 -0000      1.28
  @@ -436,18 +436,11 @@
               }
        }
   
  -        path = path.replace('\\', '/');
  -     if (!path.startsWith("/")) {
  -         // Tag file path is relative to uri of TLD file
  -            path = uri.substring(0, uri.lastIndexOf("/") + 1) + path;
  -         try {
  -             path = new File(path).getCanonicalPath();
  -         } catch (IOException ioe) {
  -             throw new JasperException(ioe);
  -         }
  -     } else if (path.startsWith("/META-INF/tags")) {
  +     if (path.startsWith("/META-INF/tags")) {
            // Tag file packaged in JAR
            ctxt.getTagFileJars().put(path, jarFile);
  +     } else if (!path.startsWith("/WEB-INF/tags")) {
  +         err.jspError("jsp.error.tagfile.illegalPath", path);
        }
   
        TagInfo tagInfo = TagFileProcessor.parseTagFile(parserController,
  
  
  
  1.68      +2 -2      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- messages.properties       10 Dec 2002 21:33:36 -0000      1.67
  +++ messages.properties       12 Dec 2002 17:44:38 -0000      1.68
  @@ -339,6 +339,6 @@
   jsp.error.multiple.jspoutput = Cannot have multiple occurrences of 
<jsp:output>
   jsp.error.attributes.not.allowed = {0} must not have any attributes
   jsp.error.tagfile.badSuffix=Missing \".tag\" suffix in tag file path {0}
  -jsp.error.tagfile.illegalPath=Missing \"/WEB-INF/tags\" or \"/META-INF/tags\" in 
tag file path {0}
  +jsp.error.tagfile.illegalPath=Illegal tag file path: {0}, must start with 
\"/WEB-INF/tags\" or \"/META-INF/tags\"
   jsp.error.plugin.wrongRootElement=Name of root element in {0} different from {1}
   jsp.error.attribute.invalidPrefix=The attribute prefix {0} does not correspond to 
any imported tag library
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to