This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT transformations with JDK1.5 and Tomcat 5.5

 
priby mathew
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings to all,

I have an application that converts XSL to PDF using FOP. This application works fine in JDK 1.4 and Tomcat5.0.

But when I moved this application into JDK1.5 and Tomcat 5.5 errors were thrown.

Initially,the error was related to serializer.jar. I heard that JDK 1.5 has inbuilt version of xalan, which requires serializer.jar. So I downloaded the serializer.jar and I had put it in lib folder of my application.
Upon doing this, the error related to serializer.jar dissappeared. But a new error occured while transformation.That is few xslt and exslt functions were not working properly.

I guess these errors are due to the inbuilt xalan and xerces version in JDK1.5.

Can anyone tell me how to make JDK use the jar(xalan and xerces) files of my application rather than the inbuilt versions. I believe the version of jar files in my application is lower than the version present in JDK 1.5

I even tried putting the jar files in JDK\lib\endorsed folder. But no success.


Any help appreciated.

Thanks in advance
priby
 
Yves Zoundi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the latest versions of Xalan and Xerces in the WEB-INF/lib folder of your application.
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your code is like the Basic Usage Pattern on the FOP website, you might need to change the Transformer that TransformerFactory returns to your version of Xalan (or Saxon, or whatever). You can do this by setting the javax.xml.transform.TransformerFactory system property.

Can you show us an example of your code, and the errors that you're getting?
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this may be of interest too. Talks about using third party implementations of core java APIs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic