• 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

problem on sax in jsp

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the following error message when I run jsp file in jakarta-tomcat.
Incompatible type for method. Can't convert SearchXML to org.xml.sax.HandlerBase. parser.parse(file, search);
SearchXML is java file which inherita DefaultHandler.
following is my code.
SAXParserFactory factory=SAXParserFactory.newInstance();
SAXParser parser=factory.newSAXParser();
SearchXML search=new SearchXML();
File file=new File("Catolog.xml");
FileReader reader=new FileReader(file);
parser.parse(file, search);

But, when I wrote the same code in application, it worked fine. I realy can't understand.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Copy the corresponding jar file into the tomcat/lib directory and check whether the catalog.xml file which is residing in the root directory(The directory where your jsp file resides).
all the best fo fullfiled your requirement.
Jowsaki
 
gary wong
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
I found out the problem.
I use jakarta-tomcat-3.2.3 which doesn't supoort org.xml.sax.helpers.DefaultHandler. eventhough, I set classpath to xerces api, it doesn't work. My resolution is deleting jax.jar and parser.jar in Tomcat, it will work fine.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am also facing the same problem. I deleted jaxp.jar and parser.jar from tomcat/lib dirctory as you have said in this forum. But after that, I coudnt start tomcat. ( I deleted names of those files from tomcat/conf directory files)
I am using tomcat 3.2 . Cant I parse with SAX with this version of Tomcat? What should I do as a solution to this problem.
Still I got stuck here and cannot proceed. Any help is greatly appreciated.
Thanks and Best Regards,
Ranjith
ranjith@dmsswt.com
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic