Mantis - Resin
Viewing Issue Advanced Details
5243 minor always 10-10-12 15:22 01-09-13 11:44
cowan  
ferg  
high  
closed 4.0.32  
fixed  
none    
none 4.0.34  
0005243: TLD not loaded when compiling jsp in case of using custom class loader.
When setting custom ClassLoader to the ContextClassLoader of currentThread in filter,
It seems that Resin cannot resolve tld file contained
in "WEB-INF/lib" of a jar file and causes jsp compile error.

I think Resin should consider the case that parent ClassLoader is
DynamicClassLoader in the process of "com.caucho.jsp.TldManager#getClassPath(ClassLoader loader)"

The current code


{{{
 private ArrayList<Path> getClassPath(ClassLoader loader)
 {
   String classpath = null;

   if (loader instanceof DynamicClassLoader)
     classpath = ((DynamicClassLoader) loader).getClassPath();
   else
     classpath = CauchoSystem.getClassPath();

   return getClassPath(classpath);
 }
}}}


might be


{{{
 private ArrayList<Path> getClassPath(ClassLoader loader)
 {
   if (loader instanceof DynamicClassLoader)
     return getClassPath(((DynamicClassLoader) loader).getClassPath());
   else if(loader.getParent() == null)
     return getClassPath(CauchoSystem.getClassPath());

   return getClassPath(loader.getParent());
 }
}}}
Rep by S. Nobuaki

Notes
(0006150)
ferg   
01-09-13 11:44   
jsp/18jp