[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1602) Can't use container level taglibs
[ http://jira.jboss.com/jira/browse/JBAS-1602?page=comments#action_12316714 ] Remy Maucherat commented on JBAS-1602: -- I have applied the patch allowing configuring the servlet options. However, I don't recommend upgrading the Tomcat binary to one built from CVS, due to current instability after the inclusion of some risky changes (including among other things Java 5 compatibility for JSPs). If this feature is needed for JBoss 4.0.2, I can provide a patched Jasper binary based on Tomcat 5.5.9. Can't use container level taglibs - Key: JBAS-1602 URL: http://jira.jboss.com/jira/browse/JBAS-1602 Project: JBoss Application Server Type: Bug Components: Web (Tomcat) service Reporter: Stan Silvert Assignee: Scott M Stark Priority: Critical Fix For: JBossAS-4.0.2 Final Attachments: EmbeddedServletOptions.java, TldLocationsCache.java JBoss/Tomcat needs a way to install tag libraries globally so they are available to all web applications. This functionality is mentioned in the JSP 2.0 spec section 7.3.5. In Tomcat standalone, you can do this, but it doesn?t work in JBoss/Tomcat. The way this works is that the Jasper TldLocationsCache ?Scans all JARs accessible to the webapp's classloader and its parent classloaders for TLDs.? If I put my jar into Tomcat standalone?s common/lib directory then the tag library will be shared across all web apps. I?ve tried putting the jar in several ?well known? locations in JBoss/Tomcat and nothing seems to work. For Reference, I?ve attached the TldLocationsCache source code from Tomcat 5.5.8. Concerning TldLocationsCache, Scott Stark says: This class is useless for non-URLClassLoaders and URLClassLoaders that do not expose their classpath via getURLs which is what we currently do because of an old bad behavior with annotated codebases of rmi classes. Remy Maucherat offered this as a possible solution: Would it be possible to have the ENCLoader facade return more interesting things ? /** * A trival extension of URLClassLoader that uses an empty URL[] as its * classpath so that all work is delegated to its parent. */ static class ENCLoader extends URLClassLoader { private URL[] urllist = new URL[0]; ENCLoader(ClassLoader parent) { super(new URL[0], parent); } void addURLInternal(URL url) { URL[] result = new URL[urllist.length + 1]; for (int i = 0; i urllist.length; i++) result[i] = urllist[i]; result[urllist.length] = url; urllist = result; } public URL[] getURLs() { return urllist; } } -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1602) Can't use container level taglibs
[ http://jira.jboss.com/jira/browse/JBAS-1602?page=comments#action_12316718 ] Scott M Stark commented on JBAS-1602: - Yes, please commit the patched jar. Can't use container level taglibs - Key: JBAS-1602 URL: http://jira.jboss.com/jira/browse/JBAS-1602 Project: JBoss Application Server Type: Bug Components: Web (Tomcat) service Reporter: Stan Silvert Assignee: Scott M Stark Priority: Critical Fix For: JBossAS-4.0.2 Final Attachments: EmbeddedServletOptions.java, TldLocationsCache.java JBoss/Tomcat needs a way to install tag libraries globally so they are available to all web applications. This functionality is mentioned in the JSP 2.0 spec section 7.3.5. In Tomcat standalone, you can do this, but it doesn?t work in JBoss/Tomcat. The way this works is that the Jasper TldLocationsCache ?Scans all JARs accessible to the webapp's classloader and its parent classloaders for TLDs.? If I put my jar into Tomcat standalone?s common/lib directory then the tag library will be shared across all web apps. I?ve tried putting the jar in several ?well known? locations in JBoss/Tomcat and nothing seems to work. For Reference, I?ve attached the TldLocationsCache source code from Tomcat 5.5.8. Concerning TldLocationsCache, Scott Stark says: This class is useless for non-URLClassLoaders and URLClassLoaders that do not expose their classpath via getURLs which is what we currently do because of an old bad behavior with annotated codebases of rmi classes. Remy Maucherat offered this as a possible solution: Would it be possible to have the ENCLoader facade return more interesting things ? /** * A trival extension of URLClassLoader that uses an empty URL[] as its * classpath so that all work is delegated to its parent. */ static class ENCLoader extends URLClassLoader { private URL[] urllist = new URL[0]; ENCLoader(ClassLoader parent) { super(new URL[0], parent); } void addURLInternal(URL url) { URL[] result = new URL[urllist.length + 1]; for (int i = 0; i urllist.length; i++) result[i] = urllist[i]; result[urllist.length] = url; urllist = result; } public URL[] getURLs() { return urllist; } } -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1602) Can't use container level taglibs
[ http://jira.jboss.com/jira/browse/JBAS-1602?page=comments#action_12316635 ] Scott M Stark commented on JBAS-1602: - I have the JspServlet patched such that a custom Options can be specified, but a problem I'm seeing is that TagLibraryInfoImpl will not resolve a file outside of the war base directory. If the path returned by getLocation() is absolute this just results in an invalid file. However, a jar uri is resolved regardless of where it is located so there is an inconsistency in how tlds are resolved. I was tyring to load the shared tlds from the jbossweb-tomcat55.sar/conf/tlds directory. If the uri is converted into a relative path with respect to the war this works in terms of finding the resource, but the compiler's check for out of date dependencies fails as it expects a URL: 20:34:48,937 INFO [STDOUT] java.net.MalformedURLException: Path ../jbossweb-tomcat55.sar/conf/tlds/myfaces_core.tld/ does not start with a / character 20:34:48,937 INFO [STDOUT] at org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:471) 20:34:48,937 INFO [STDOUT] at org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:178) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.JspCompilationContext.getResource(JspCompilationContext.java:267) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:398) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:315) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) 20:34:48,937 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) So I had to put the tlds in jars within the jbossweb-tomcat55.sar/conf/tlds and this appears to work. The patch to the JspServlet has been submitted to the tomcat bugzilla under the following bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=34272 Can't use container level taglibs - Key: JBAS-1602 URL: http://jira.jboss.com/jira/browse/JBAS-1602 Project: JBoss Application Server Type: Bug Components: Web (Tomcat) service Reporter: Stan Silvert Assignee: Scott M Stark Priority: Critical Fix For: JBossAS-4.0.2 Final Attachments: EmbeddedServletOptions.java, TldLocationsCache.java JBoss/Tomcat needs a way to install tag libraries globally so they are available to all web applications. This functionality is mentioned in the JSP 2.0 spec section 7.3.5. In Tomcat standalone, you can do this, but it doesn?t work in JBoss/Tomcat. The way this works is that the Jasper TldLocationsCache ?Scans all JARs accessible to the webapp's classloader and its parent classloaders for TLDs.? If I put my jar into Tomcat standalone?s common/lib directory then the tag library will be shared across all web apps. I?ve tried putting the jar in several ?well known? locations in JBoss/Tomcat and nothing seems to work. For Reference, I?ve attached the TldLocationsCache source code from Tomcat 5.5.8. Concerning TldLocationsCache, Scott Stark says: This class is useless for non-URLClassLoaders and URLClassLoaders that do not expose their classpath via getURLs which is what we currently do because of an old bad behavior with annotated codebases of rmi classes. Remy Maucherat offered this as a possible solution: Would it be possible to have the ENCLoader facade return more interesting things ? /** * A trival extension of URLClassLoader that uses an empty URL[] as its * classpath so that all work is delegated to its parent. */ static class ENCLoader extends URLClassLoader { private URL[] urllist = new URL[0]; ENCLoader(ClassLoader parent) { super(new URL[0], parent); } void addURLInternal(URL url) { URL[] result = new URL[urllist.length + 1]; for (int i = 0; i urllist.length; i++) result[i] = urllist[i]; result[urllist.length] = url; urllist = result; } public URL[] getURLs() { return urllist; } } -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of
[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1602) Can't use container level taglibs
[ http://jira.jboss.com/jira/browse/JBAS-1602?page=comments#action_12316474 ] Stan Silvert commented on JBAS-1602: The problem is with the way that Jasper is trying to locate TLD's. If you look at EmbeddedServletOptions.java, you can see that somebody meant for the TldLocationsCache to be pluggable. If it were we could easily write our own and pass the class name into the JspServlet as an option. Can we make this change to Tomcat/Jasper so that we can write our own TldLocationsCache? Can't use container level taglibs - Key: JBAS-1602 URL: http://jira.jboss.com/jira/browse/JBAS-1602 Project: JBoss Application Server Type: Bug Components: Web (Tomcat) service Reporter: Stan Silvert Priority: Critical Attachments: TldLocationsCache.java JBoss/Tomcat needs a way to install tag libraries globally so they are available to all web applications. This functionality is mentioned in the JSP 2.0 spec section 7.3.5. In Tomcat standalone, you can do this, but it doesn?t work in JBoss/Tomcat. The way this works is that the Jasper TldLocationsCache ?Scans all JARs accessible to the webapp's classloader and its parent classloaders for TLDs.? If I put my jar into Tomcat standalone?s common/lib directory then the tag library will be shared across all web apps. I?ve tried putting the jar in several ?well known? locations in JBoss/Tomcat and nothing seems to work. For Reference, I?ve attached the TldLocationsCache source code from Tomcat 5.5.8. Concerning TldLocationsCache, Scott Stark says: This class is useless for non-URLClassLoaders and URLClassLoaders that do not expose their classpath via getURLs which is what we currently do because of an old bad behavior with annotated codebases of rmi classes. Remy Maucherat offered this as a possible solution: Would it be possible to have the ENCLoader facade return more interesting things ? /** * A trival extension of URLClassLoader that uses an empty URL[] as its * classpath so that all work is delegated to its parent. */ static class ENCLoader extends URLClassLoader { private URL[] urllist = new URL[0]; ENCLoader(ClassLoader parent) { super(new URL[0], parent); } void addURLInternal(URL url) { URL[] result = new URL[urllist.length + 1]; for (int i = 0; i urllist.length; i++) result[i] = urllist[i]; result[urllist.length] = url; urllist = result; } public URL[] getURLs() { return urllist; } } -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development