You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dmitry Beransky <db...@dembel.org> on 2001/08/10 01:42:55 UTC

xalan and problem with locating custom libraries

Hi,

I need to use XSLT from inside jsp.  I decided to go with Xalan/Xerces and 
in order to make them work under Tomcat (3.2.2), I replaced jaxp.jar and 
parser.jar with xalan.jar and xerces.jar in tomcat's lib 
directory.  Everything works fine, until  in my stylesheets I try to make 
use of custom Java extension functions.  These extension functions are 
specific to the application (context) in which they are running and are 
defined in a jar file located in /WEB-INF/lib of the same context as the 
jsp files that initiate XSLT processing.

The problem is that the xsl engine doesn't see my libraries.  And it makes 
sense, since the engine sits in xalan.jar which is loaded at startup and my 
application libraries are loaded later by a different class loader.  An 
obvious work-around would be to have these libraries loaded at startup 
too.  But I REALLY, really hate doing this, because they simply don't 
belong there.  This doesn't strike me as neither a secure nor a scaleable 
solution.  But it's the only solution I can think of.

Is there something else I can do?

Regards
Dmitry