Take a look at 
http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/Docu
mentBuilder.html#setEntityResolver
(org.xml.sax.EntityResolver) .  

You can programmatically tell DOM where to get the DTD.


---- Original message ----
>Date: Wed, 9 Nov 2005 16:31:46 -0500
>From: <[EMAIL PROTECTED]>  
>Subject: Urgent - Question about "web-facesconfig_1_1.dtd"  
>To: <[email protected]>
>
>
>Hello,
>
>       We are deploying our app for the first time in a pre-
production environment, one that is protected by a firewall. 
Here is the bit of code that is giving us a hard time:
>
>
>*** snip *************************
>
>is = this.getClass().getResourceAsStream("/faces-
config.xml");
>                                               
>DocumentBuilderFactory docBuilderFactory = 
DocumentBuilderFactory.newInstance();                   
                
>DocumentBuilder docBuilder = 
docBuilderFactory.newDocumentBuilder();
>
>                       
>Document xmlDocument = docBuilder.parse( is );
>                       
>***********************************
>
>When I call the "parse" line...I eventually get 
a "java.net.ConnectException: Connection timed out"
>exception. I figure one of the classes (not mine) is trying 
to dnload "web-facesconfig_1_1.dtd" but can't suddenly 
because of the firewall ( the first time this app runs behind 
a firewall ).
>
>
>However, this file (versions 1_0 & 1_1) are both in 
myfaces.jar which is in the lib directory Under WEB-INF ... 
So I do not understand why this file needs to be downloaded 
from sun...
>
>
>Note 1: We are still using myfaces 1.0.9 (migrating to the 
latest VERSION is out - our tests are already almost 
complete) Note 2: I use IBM RAD 6.0 (with all the service 
packs) Note 3: we are deploying on a websphere 5.x (all the 
latest patches)
>
>
>Has anyone ever had this problem ?
>
>Any ideas on a workaround ?
>
>Thanks in advance,
>
>
>Mark
Dennis Byrne

Reply via email to