File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XSLT transformations with JDK1.5 and Tomcat 5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSLT transformations with JDK1.5 and Tomcat 5.5" Watch "XSLT transformations with JDK1.5 and Tomcat 5.5" New topic

XSLT transformations with JDK1.5 and Tomcat 5.5

priby mathew

Joined: Jan 28, 2008
Posts: 25
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
Yves Zoundi
Ranch Hand

Joined: Aug 31, 2008
Posts: 47
Put the latest versions of Xalan and Xerces in the WEB-INF/lib folder of your application.

Author of VFSJFileChooser and XPontus XML Editor
Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

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

Joined: Aug 05, 2008
Posts: 378
this may be of interest too. Talks about using third party implementations of core java APIs.
I agree. Here's the link:
subject: XSLT transformations with JDK1.5 and Tomcat 5.5
It's not a secret anymore!