Having java.net.UnknownHostException in using DOM
Hello Guys,
I am trying to read an XML file using DOM. Everything works except for an exception thrown if I uncomment the portion of my XML file that specifies the doctype, like this...
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
the exception thrown is such
IOException: jakarta.apache.org
java.net.UnknownHostException: jakarta.apache.org
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)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
.
.
.
When I comment this section my application works fine. But on uncomment it, I get the exception.
Please what do I do.
Michael

