• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Xalan Extensions call in servlet

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:formatter="XalanExtension"
extension-element-prefixes="formatter"
version="1.0">
<xsl:template match="/">
<xsl:value-of select="formatter:format($text)"/>
</xsl:template>
</xsl:stylesheet>
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 ?
Thx,
Holger
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic