org.apache.jasper.glassfish System Library assumptions?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

org.apache.jasper.glassfish System Library assumptions?

This post has NOT been accepted by the mailing list yet.
Im running a simple Eclipse plugin project that is trying to use the jasper.glassfish bundle to compile a JSP. I am using Equinox SDK 4.3.2 - which includes jasper.glassfish 2.2.2.

I have put the the org.apache.taglibs.standard.glassfish jar within my bundle resource classpath and stepped through the runtime behavior to see how the TLD processing and JSP compilation behaves.

The following bit of code in really confuses me when the code tries to process the c.tld included in the standard taglibs.

        if ((isLocal
                // Local tld files override the tlds in the jar files,
                // unless it is in a system jar (except when using myfaces)
                && mappings.get(uri) == null
                && !systemUris.contains(uri)
                && (!systemUrisJsf.contains(uri) || useMyFaces)
            ) ||
                // Jars are scanned bottom up, so jars in WEB-INF override
                // thos in the system (except when using myfaces)
                && (mappings.get(uri) == null
                    || systemUris.contains(uri)
                    || (systemUrisJsf.contains(uri) && !useMyFaces)
           ) {
            String entryName = tldInfo.getEntryName();
            if (log.isLoggable(Level.FINE)) {
                log.fine("Add tld map from tld in " +
                    (isLocal? "WEB-INF": "jar: ") + uri + "=>" +
                    resourcePath + "," + entryName);
            mappings.put(uri, new String[] {resourcePath, entryName});

systemuris is initialized in a static block of that class:

    static {

So, because the Uri matches what is defined in systemUris, my c.tld URI is never included in the Tld processing mappings - and eventually I get an error saying it cannot reference an absolute URI (since there was no mapping for it found).

What is the assumption for this "systemUri" filtering? How am I supposed to make a valid reference to c.tld in a JSP when running in Eclipse using the glassfish library?

Many thanks.