Advertisement

02.10.2005 at 03:34PM PST, ID: 21310483
[x]
Attachment Details

How to use the XMLTextReader Taglib ?

Asked by sdesar in Java Server Pages (JSP), Java Standard Tag Library (JSTL) & Server Tags

Tags:

Hello,

I am trying to use a taglib provided by this coldbeans website -

http://www.servletsuite.com/servlets/xmlread.htm

I would like the Taglib to read the XML file and output its values into the JSP, but I am getting an error.

Please advise how to fix it.

Thanks


The JSP  'readFile.jsp' page looks like this -


<%@ taglib uri='http://java.sun.com/jstl/core' prefix='c' %>
<%@ taglib uri='taglib54.tld' prefix='sax' %>


<HTML>
<title> Hello</title>

<body>
<sax:XMLTextReader xmlData="serversA.xml">

<sax:ifNameEquals name="connection-name"><b></sax:ifNameEquals>
  <br>Node name is:<sax:getName/>Node value is: <sax:getValue/>
<sax:ifNameEquals name="connection-name"></b></sax:ifNameEquals>

</sax:XMLTextReader>
This is a test for XML

</body>
</html>

The serversA.xml file is this -

<?xml version="1.0" encoding="UTF-8"?>
<server-list>
      <connection-info>
            <connection-name>ost-dev</connection-name>
            <server-name>ALIEN99</server-name>
            <project-name>ose_visdev</project-name>
            <project-type>visdev</project-type>
                      <artist-workspace-name>artist_test</artist-workspace-name>
                      <grouping-basename>gr-ost-dev</grouping-basename>
      </connection-info>    

</server-list>

The error when I load the JSP is -
The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: com.cj.xmlread.strVariable
      org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
      org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404)
      org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:319)
      org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:454)
      org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:291)
      org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:205)
      org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
      org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
      org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
      org.apache.jasper.compiler.Parser.parse(Parser.java:171)
      org.apache.jasper.compiler.ParserController.parse(ParserController.java:253)
      org.apache.jasper.compiler.ParserController.parse(ParserController.java:137)
      org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

java.lang.ClassNotFoundException: com.cj.xmlread.strVariable
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1383)Start Free Trial
 
Loading Advertisement...
 
[+][-]02.11.2005 at 02:02AM PST, ID: 13284139

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Server Pages (JSP), Java Standard Tag Library (JSTL) & Server Tags
Tags: node
Sign Up Now!
Solution Provided By: TimYates
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.11.2005 at 10:34AM PST, ID: 13288635

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 10:36AM PST, ID: 13288660

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 10:39AM PST, ID: 13288682

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 11:01AM PST, ID: 13288865

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 11:31AM PST, ID: 13289141

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 01:00PM PST, ID: 13290026

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 01:02PM PST, ID: 13290054

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.11.2005 at 03:22PM PST, ID: 13291344

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.15.2005 at 12:40PM PST, ID: 13317867

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.15.2005 at 03:28PM PST, ID: 13319477

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02.15.2005 at 03:28PM PST, ID: 13319488

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.16.2005 at 11:11AM PST, ID: 13327443

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.16.2005 at 12:31PM PST, ID: 13328411

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.16.2005 at 12:32PM PST, ID: 13328425

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.18.2005 at 03:24PM PST, ID: 13350656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32