https://issues.apache.org/bugzilla/show_bug.cgi?id=57574

            Bug ID: 57574
           Summary: javax.el.ImportHandler.importPackage() does not work
                    in Equinox OSGi
           Product: Tomcat 8
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
          Assignee: dev@tomcat.apache.org
          Reporter: j...@mortbay.com

Created attachment 32462
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32462&action=edit
ImportHandler proposed patch

The code in javax.el.ImportHandler.importPackage(String name) tries to load a
package, first via java.lang.Package.getPackage(name), and if that fails, via
the thread context classloader getResource(name) instead.

The call to Package.getPackage(name) appears to return null under Equinox, not
sure about other osgi environments.

Unfortunately the call to the TCCL.getResource(name) also returns null, because
the name does not have a trailing '/'. Eg "javax/servlet" should be
"javax/servlet/".

The attached patch always adds a trailing '/' to the package name. The fix has
been tested on a recent version of Equinox. 

regards
Jan

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to