What works for me is to add the dtd files to the WEB-INF directory, and the xml parser searches there before trying the URL. I think the solution to this problem depends on your xml parser, though. I've also seen others suggest writing your own EntityResolver.
On 11/29/05, Juan Medín Piñeiro <[EMAIL PROTECTED]> wrote: > Wayne, thank you for your help. > > The problem is that it isn't my faces-config, it's the tomahawk.jar > one. I could change its xml and zip again the file, but that'd be a > hack. > > I wonder if isn't there any way to disable the DTD check or, at least, > add it to a xml DTD catalog to redirect it to local DTD. > > Regards, > > - Juan > > On 11/29/05, Wayne Fay <[EMAIL PROTECTED]> wrote: > > Look at your faces-config.xml > > > > <?xml version="1.0" encoding="ISO-8859-1" ?> > > <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD > > JavaServer Faces Config 1.1//EN" > > "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> > > > > Since it specifies a remote DTD, your server will always attempt to > > download this DTD when it loads the config file. > > > > You can change this line to a local file path instead ie: > > <?xml version="1.0" encoding="ISO-8859-1" ?> > > <!DOCTYPE faces-config SYSTEM "/path/to/dtd/web-facesconfig_1_1.dtd"> > > > > And then download and copy this file to the specified place in your file > > system. > > > > Wayne > > > > > > On 11/29/05, Juan Medín Piñeiro <[EMAIL PROTECTED]> wrote: > > > I was trying to run a faces application without being connected to > > > Internet. I get the following message: > > > > > > [JavaServer Faces] 13:47:56 WARN ConfigureListener : 239 - Can't > > > parse configuration > > > file:jar:file:/C:/Projects/nsi/WebContent/WEB-INF/lib/tomahawk.jar!/META-INF/faces-config.xml > > > java.net.UnknownHostException: java.sun.com > > > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) > > > at java.net.Socket.connect(Socket.java:507) > > > at java.net.Socket.connect(Socket.java:457) > > > at sun.net.NetworkClient.doConnect(NetworkClient.java:157) > > > > > > > > > Even when I explicitly disable the xml validation: > > > > > > <context-param> > > > <param-name>com.sun.faces.validateXml</param-name> > > > <param-value>false</param-value> > > > </context-param> > > > > > > Any comment would be really welcome. I don't know why it is trying to > > > validate that xml. > > > > > > Regards, > > > > > > - Juan > > > > > >

