[jboss-jira] [JBoss JIRA] Commented: (JBAS-2676) ClassLoader getResources() omits directory but finds files in the directory - this affects Facelets *.taglib.xml auto-loading
Howard Lewis Ship (JIRA)
jira-events at lists.jboss.org
Tue Feb 20 12:48:35 EST 2007
[ http://jira.jboss.com/jira/browse/JBAS-2676?page=comments#action_12353656 ]
Howard Lewis Ship commented on JBAS-2676:
-----------------------------------------
I'm having the same issue as Facelets, for Tapestry 5.
https://issues.apache.org/jira/browse/TAPESTRY-1287
Just want the JBoss and/or Tomcat class loaders to do the same as Sun's ... return directories. I'm going to see if I can do a workaround based on ServletContext to access classes inside WEB-INF/classes.
> ClassLoader getResources() omits directory but finds files in the directory - this affects Facelets *.taglib.xml auto-loading
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-2676
> URL: http://jira.jboss.com/jira/browse/JBAS-2676
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Web (Tomcat) service
> Affects Versions: JBossAS-4.0.3 SP1
> Environment: Windows XP, JDK 1.5.0_04
> Reporter: David Richmond
> Assigned To: Remy Maucherat
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list