Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Xalan Extensions call in servlet  RSS feed

Holger Prause
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
During Xslt processing i want Xalan to call a Extension Class auf me.When i do it "local" that means i process the XML-File and Xslt with a Programm with a main mathod.Everything works fine.
But if i copy the code into a Servlet nothing works anymore.
I have all necessary jar in Classpath

Following xml-Code

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl=""
<xsl:template match="/">
<xsl:value-of select="formatter:format($text)"/>
I think u dont want to c the java code ,its too simple ...
when i run this with servlets i get the following message :
Call to extension function failed: unable to load class 'XalanExtension'
mybe it depends on the directory where the program is started , Servlet runs in a different Enviroment than my program,so it has different pathes to my Extension-Class.That would be an explination.I dont know how to hardcode the path to the Extension-Class so this also dont works.
I tried to jar my Extension-Class and to put it in my Classpath , i had the hope that Xalan looks in the Classpath for this jar, but this also didnt work :-(

P.S(the xml-mail archive from apache is down,so i have to post my question here)
Has anyone of u a solution / suggestion ?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!