[jdom-interest] DOCTYPE Problem
Frank Sauer
Frank.Sauer at trcinc.com
Thu Oct 31 09:22:46 PST 2002
you need to add an entity resolver to the SAXBuilder. Something like this:
saxBuilder.setEntityResolver(new EntityResolver() {
public InputSource resolveEntity(String publicID, String systemID) {
if ("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".equals(publicID)) {
return new InputSource(Resource.asStream("web-app_2_3.dtd"));
} else
return null;
}
});
where web-app_2_3.dtd is a local copy of the dtd available on the classpath.
Frank
-----Original Message-----
From: Jesus Barbero Rodriguez [mailto:jbarbero at quiter.com]
Sent: Thursday, October 31, 2002 12:02 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] DOCTYPE Problem
Hello all!!
I'm a spanish developer. I have do a getaway with tomcat, jdom etc etc. I need change the web.xml file of my webapp. I have a problem. This file has a DocType like this:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
When i try to parse the document, thow SAXException:
org.jdom.JDOMException: Error on line 2: Entidad externa no encontrada: "http://java.sun.com/dtd/web-app_2_3.dtd".: Connection refused: connect
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:278)
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:307)
at plugins.administracion.confServicios.AdmServicios.getDocument(AdmServicios.java:459)
I can't connect because i haven't got Internet connection.
I need build this document and i can't do it!!!!
Please, someone can help me, please??
After a week, I haven't could solve this problem.
thanks for all
PD: I can't delete the doctype because if i do it, tomcat not open the web.xml.
PD2: Sorry for my bad english :-)
More information about the jdom-interest
mailing list