• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSLTProcessor

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to make use of XSLTProcessor (org.apache.xalan.xslt package) in my jsp page. The problem is even after I have already included the jar files (from xalan-j_2_4_D1-bin.zip that i downloaded in xml.apache.org) in the jre/lib/ext dir of the jdk i'm using, when I run the jsp page, the ff errors occur:
*****************************************
Type XSLTProcessor was not found.
C:\\Program Files\\Allaire\\JRun\\servers\\default\\default-app\\AdminTool\\transformXML2.jsp:44: Error: "XSLTProcessorFactory" is either a misplaced package name or a non-existent entity.
C:\\Program Files\\Allaire\\JRun\\servers\\default\\default-app\\AdminTool\\transformXML2.jsp:53: Error: Type XSLTInputSource was not found.
C:\\Program Files\\Allaire\\JRun\\servers\\default\\default-app\\AdminTool\\transformXML2.jsp:57: Error: Type XSLTResultTarget was not found.
*****************************************
//my code
<%@ page import="org.w3c.dom.*" %>
<%@ page import="org.xml.sax.*" %>
<%@ page import="javax.xml.parsers.*" %>
<%@ page import="javax.xml.transform.*" %>
<%@ page import="javax.xml.transform.stream.*" %>
<%@ page import="javax.xml.transform.dom.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.text.*" %>
<%@ page import="org.apache.xalan.xslt.*" %>
<%
try {
XSLTProcessor p = XSLTProcessorFactory.getProcessor();

StringBuffer requestURL = HttpUtils.getRequestURL(request);
URL jspURL = new URL(requestURL.toString());
URL in1URL = new URL(jspURL,"master.xml");
URL in2URL = new URL(jspURL,"images.xml");
URL in3URL = new URL(jspURL,"labels.xml");
URL xslURL = new URL(jspURL,"page1.xsl");
p.process(new XSLTInputSource(in1URL.openStream{}),
new XSLTInputSource(in2URL.openStream{}),
new XSLTInputSource(in3URL.openStream{}),
new XSLTInputSource(xslURL.openStream{}),
new XSLTResultTarget(out)
);
out.flush();
}
catch (Exception ex) {
ex.printStackTrace();
}
%>
 
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't see the XSLTProcessorFactory under this new JavaDoc

http://xml.apache.org/xalan-j/apidocs/index.html
 
Krysty Sullivan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi erin! You mean you can't see the XSLTProcessorFactory class in org.apache.xalan.xslt package? But whenever i search for XSLTProcessorFactory class in google.com, it brings me to the documentation of
org.apache.xalan.xslt package where XSLTProcessorFactory is included as its class. I double-checked the org.apache.xalan.xslt package I downloaded at xml.apache.org and found out that there was no XSLTProcessorFactory class found in the zip file. What do you suggest I should do?
 
reply
    Bookmark Topic Watch Topic
  • New Topic