Java URL bug
I guess this is a bug in java.
I tried opening a page : http://nds1.nds.nokia.com/uaprof/N3250r100.xml. The page has UAProf info of Nokia 3250. It works and opens fine.
However the page http://nds1.nds.nokia.com/ does not. If you tried opening it from browser (Mozilla) it returns page not found and specifically says "The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it."
While trying to open the page with the following snippet
profile="http://nds1.nds.nokia.com/uaprof/N3250r100.xml";
URL url = new URL(profile);
SAXReader reader = new SAXReader();
Document doc = reader.read(url);
It throws an UnknownHostException.
How can I fetch this page without havign this error, there shld be a way to bye pass this.
# 1
Are you sure this isn't a proxy server issue?
If you're behind a proxy server (e.g. in a corporate environment), you won't be able to resolve the DNS name directly. It works in the browser because the browser just sends the request to the proxy which does the name resolution.
I'm not sure how you'd configure Java to go via your proxy in this case. There are a couple of system properties which might help.
# 2
I am behind a proxy but i think java uses my default browser setting to connect to the internet.
If it does not, that's still a bug in java, it shld b able to detect default browser settings. However, atleast if it can't it should allow setting the proxy server and port.
Any idea as to how to make this config?
Note: The unknown host exception is complainin about the host http://nds1.nds.nokia.com which I cannot access too from the browser.
Thnx.
Message was edited by:
lekkie.aydot
# 5
> If it does not, that's still a bug in java, it shld b able to detect default browser settings. Nope. And if it is a multi-user environment with several users, severals browsers with dirferent settings? Some browsers even support several profiles with different