Smallworld 5 Specific Coding

HTTP Connections Behind Proxy

If you have created java code that does any type of connection to the web like HttpURLConnection, you may run into issues connecting behind a Proxy Server.

You can add code to incorporate proxy code like:

Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("10.0.0.1", 8080));
conn = new URL(urlString).openConnection(proxy);

Or you can use the -D options http.proxyHost and http.proxyPor to start the Smallworld Java session. This way you don't have to add the proxy to all of your code.[1]

This could also be used by ACPs

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License