Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2676

ClassLoader getResources() omits directory but finds files in the directory - this affects Facelets *.taglib.xml auto-loading

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: JBossAS-4.0.3 SP1
    • Fix Version/s: None
    • Component/s: Web (Tomcat) service
    • Labels:
      None
    • Environment:

      Windows XP, JDK 1.5.0_04

      Description

      Using JSF and Facelets.
      Have a JAR file in my WebApps WEB-INF/lib, JAR file contains META-INF/faces-config.xml and META-INF/isalib.taglib.xml

      Using the Thread.currentThread().getContextClassLoader() classloader:
      .getResources("META-INF/faces-config.xml") finds the file in the JAR
      .getResources("META-INF/") does not find the directory in the JAR

      This is quite important, since Facelets scans the classpath for "META-INF/" dircetories and searches for *.taglib.xml files therein - this allows Facelets to auto-load the files it finds.

      One work around is to copy the taglib.xml file into my web-app and point the facelets.LIBRARIES context parameter at the file. Another workaround is to put the taglib.xml file into the Web-App's META-INF directory (since WAR files are on the classpath - is this an error?). However, the taglib.xml definitions belong to the JAR and can change when the JAR source code changes - so loading from the JAR is prefered.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rmaucher Remy Maucherat
                Reporter:
                djr667 David Richmond
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: