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.

[882 byte] By [lekkie.aydota] at [2007-11-26 15:56:40]
# 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.

dannyyatesa at 2007-7-8 22:17:28 > top of Java-index,Core,Core APIs...
# 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

lekkie.aydota at 2007-7-8 22:17:28 > top of Java-index,Core,Core APIs...
# 3
15 seconds with Google reveals: http://java.sun.com/j2se/1.5.0/docs/guide/net/proxies.html
dannyyatesa at 2007-7-8 22:17:28 > top of Java-index,Core,Core APIs...
# 4
Or, for 1.4.2: http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
dannyyatesa at 2007-7-8 22:17:28 > top of Java-index,Core,Core APIs...
# 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
BIJ001a at 2007-7-8 22:17:28 > top of Java-index,Core,Core APIs...
# 6
Looking forward to receiving my dukes :-)
dannyyatesa at 2007-7-8 22:17:28 > top of Java-index,Core,Core APIs...