Assuming your host and port values are correct, you would also probably need to specify a lists of hosts that are not sent through the proxy server. If n ot, all host requests, even “localhost” are sent through the proxy.
From Sun’s documentation:
http.nonProxyHosts indicates the hosts which should be connected to directly and not through the proxy server. The value can be a list of hosts, each seperated by a |, and in addition a wildcard character (*) can be used for matching. For example: