Using proxy in a JeditorPane browser

Hello,

I am making a Java browser which uses a proxy although when i go to google or any other site using this i get a 403 error - forbidden.

System.setProperty("proxySet", "true");

System.setProperty("http.proxyHost", "*******");

System.setProperty("http.proxyPort", "80");

I am using JeditorPane. Please could someone give the reason for this.

Is it by any chance to do with the user agent.

Cheers

John

[459 byte] By [John4938a] at [2007-10-3 4:09:37]
# 1
Tell you what. If you think this has anything to do with JEditorPane, then take your code and put it into a simple command-line application. See if that makes a difference.
DrClapa at 2007-7-14 22:09:42 > top of Java-index,Java Essentials,Java Programming...
# 2

import java.net.*;

import java.io.*;

public class ProxyTester

{

public static void main(String[] args) throws Exception

{

System.setProperty("proxySet", "true");

System.setProperty("http.proxyHost", "195.187.51.200");

System.setProperty("http.proxyPort", "80");

URL url = new URL("http://www.whatsmyip.org");

BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));

String inputLine;

while((inputLine = in.readLine()) != null)

System.out.println(inputLine);

in.close();

}

}

Strange - still get a 403 error.

Is this the kind of application you meant?

Cheers

John4938a at 2007-7-14 22:09:42 > top of Java-index,Java Essentials,Java Programming...
# 3
If the proxy is forbidding you from going anywhere, I suggest you seek help on a support forum which relates specifically to the proxy.
YAT_Archivista at 2007-7-14 22:09:42 > top of Java-index,Java Essentials,Java Programming...