On "\WebSphere\AppServer\hosts\default_host\MyWebApp\lib", I've added :
- taglibs-xtags.jar
- dom4j.jar
- dom4j-full.jar
- xml-apis.jar
- crimson.jar
- saxon.jar
-->I've also added the classpath of each jar file on the administrative
console of websphere.
On "\WebSphere\AppServer\hosts\default_host\MyWebApp\web\WEB-INF", I've
added :
- taglibs-xtags.tld
So, I've written a JSP containing 2 lines of code :
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0"
prefix="xtags"%>
<xtags:parse uri="stocks.xml"/>
When I run it, the server catches an exception :
Servlet cible : JSP 1.1 Processor
Tra?age de pile :
----------------------------------------------------------------------------
----
Erreur root -1: Could not initialize a SAX Parser. Please add a SAX parser
to your classpath along with preferably jaxp.jar Nested exception: Could not
initialize a SAX Parser. Please add a SAX parser to your classpath along
with preferably jaxp.jar
org.dom4j.DocumentException: Could not initialize a SAX Parser. Please add a
SAX parser to your classpath along with preferably jaxp.jar Nested
exception: Could not initialize a SAX Parser. Please add a SAX parser to
your classpath along with preferably jaxp.jar
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at org.dom4j.io.SAXReader.read(SAXReader.java:233)
at org.apache.taglibs.xtags.xpath.ParseTag.doStartTag(ParseTag.java:116)
at site.AFP._test_jsp_0._jspService(_test_jsp_0.java:132)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:390)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:712)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:879)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Please, help-me to resolve this error!
I'm looking for a way to display xml file content in a JSP...
I've tried with JSTL solution but we are on Websphere 3.5 which complaints
JSP 1.1 Processor not 1.2...
Waiting for your responses
THANKS!
That's pretty much your answer right there. What do you not understand
about it, or what do you need help with? Presumably, you're using a
version of the JDK prior to 1.4, and even though you've got an XML
parser in the classpath, you don't have a valid JAXP setup.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
"Chris Smith" <cds...@twu.net> a écrit dans le message de news:
MPG.19045530e...@news.altopia.com...
You either:
a. Install the 1.4 JDK, OR
b. Install the JAXP package
I don't know if upgrading the JDK will break WebSphere. Do you have
documentation from them on supported configurations, or a support
contract to call and ask them? Alternatively, maybe someone else will
pipe up with an answer.
I'm pretty sure, on the other hand, that installing the Sun JAXP package
will not break WebSphere. If it does, then you can easily remove it
from the classpath again, and then look for other solutions.
"Chris Smith" <cds...@twu.net> a écrit dans le message de news:
MPG.19048399a...@news.altopia.com...
No, JAXP doesn't require a "JSP Processor" at all. Have you made all
the JAXP jars available to your web application?
"Chris Smith" <cds...@twu.net> a écrit dans le message de news:
MPG.19048c69c...@news.altopia.com...
Sigh... it appears to now be available only as part of the "web services
developer pack" at:
http://java.sun.com/webservices/downloads/webservicespack.html
I wish Sun would quit playing these games...
I have added jaxp.jar, but it still display the same error...
I'm going crazy!
"Chris Smith" <cds...@twu.net> a écrit dans le message de news:
MPG.1904b3534...@news.altopia.com...