Re: error XMLReader ([email protected])

"Philippe Krief" <[email protected]>
Newsgroups gmane.text.xml.sax.general
Message-ID <[email protected]>
Hi Duc Hai,
Check your classpath, it seems that your classpath references some JAXP 
apis but it doesn't contain any compliant SAX2.0 class library...
This library should contain, at least, the following packages:
        - org.xml.sax
        - org.xml.sax.helpers (containing the missing class DefaultHandler)!

Best regards
Philippe
========================================================
Message: 2
To: [email protected]
From: [email protected]
Date: Fri, 20 Dec 2002 14:58:40 +0100
Subject: [Sax-users] error  XMLReader

Dear Sir,


My program can parser XML very well by using your XMLReader. Here is its
structure.
But I cann't convert it to a BEAN for my script JSP
I hit the error following:

org.apache.jasper.JasperException: Impossible de compiler la classe pour
JSPC:
\jakarta-tomcat-3.2.3\work\localhost_8080%2Fimport\_0002fimport_0002ejspimport_jsp_12.java:0:

Class org.xml.sax.helpers.DefaultHandler not found in class
vn.vnteam.pondi.PondiImport.
import javax.servlet.*;
^
1 error

I am a new user XML et I dont know I can fit this error.
Thanks for your helps, Marry Christmas and Happy New Year to you
Best regards
NGUYEN Duc Hai


// ----------------------------------------------
package vn.vnteam.pondi;

public class PondiImport extends DefaultHandler {
    public static void main(String argv) {
        try {
            XMLReader parser = XMLReaderFactory.createXMLReader
("org.apache.xerces.parsers.SAXParser");
            PondiImport PondiImportInstance = new PondiImport();
            parser.setContentHandler(PondiImportInstance);
            parser.parse(argv);
        }
        catch(IOException ioe) {
            ioe.printStackTrace();
        }
        catch(SAXException saxe) {
            saxe.printStackTrace();
        }
    }


    public void characters(char[] ch, int start, int length) throws
SAXException {
        String s = new String(ch, start, length);
        System.out.println( getIndent() + "Value: " + s);
    }
    public void endDocument() throws SAXException {
    }
    public void endElement(String uri, String localName, String qName)
throws SAXException {
    }
    public void startDocument() throws SAXException {
    }
    public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
    }
    private String getIndent() {
}
// ----------------------------------------------



-------------------------------------------------------
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
_______________________________________________
List: [email protected]
See:  http://www.saxproject.org
https://lists.sourceforge.net/lists/listinfo/sax-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.