[jdom-interest] Using SAXBuilder offline

Alex Rosen arosen at silverstream.com
Mon Aug 26 10:07:40 PDT 2002

There's an entry in the JDOM FAQ for this (www.jdom.org)


> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Matthew Lavy
> Sent: Friday, August 23, 2002 4:17 AM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Using SAXBuilder offline
> Hello, 
> I'm having a bit of a JDOM emergency, and wondered if anyone knew the 
> answer... 
> I am using JDOM to parse a program's XML configuration file. The 
> configuration file is in the Java Servlet web.xml format 
> (including relevant 
> DOCTYPE definition). The reason for this is that I am using 
> the same web.xml 
> file to configure a servlet as an application. In servlet 
> land, tomcat gets 
> on with the business of reading the XML file; in application 
> land, I am 
> doing it myself, with the aid of the code fragment below: 
> SAXBuilder parser = new SAXBuilder();
> parser.setValidation(false);
> Document doc = parser.build(filename); 
> On my test machine at home this works beautifully. However, 
> on the machine 
> on which my application has to run I have a problem: 
> parser.build() hangs 
> for ages and then times out! Further investigation reveals 
> that something is 
> trying to connect to the java.sun.com website (presumably in 
> response to the 
> DOCTYPE). This is not great, because the machine I am running 
> on doesn't 
> have a network connection!! 
> I would be very grateful if anyone could give advice on how 
> to prevent JDOM 
> or its dependencies from trying to make outbound network 
> connections when 
> parsing an XML file. 
> Many thanks in advance. 
> Matthew 
>  --
> Matthew M Lavy MA PhD ARCM LTCL
> Tel: 01223 511338 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com

More information about the jdom-interest mailing list