Tomcat and proxy settings
While specifying proxy settings, you have to define the proxy server name like below:
"-Dhttp.proxyHost=proxy.example.com"
I do not agree with the usage of java.net.Proxy
.
What happens if you need to change it ? New build, new release. The setting of the proxy should be easy. It works well with both system properties or tomcat JAVA_OPTS. I used it in both ways. Just pay attention and be sure you know what JAVA_OPTS are loaded, what java is used and so on, because there are tomcats that have their own java version. Regardint the previous post, there is no way java can be used before was loaded :). So Tomcat cannot use it before the system properties are used...only if tomcat uses another JRE that does not read system properties.
I just test this setup :
set "JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxyHost=proxy.com -Dhttp.proxyPort=8080 "
in catalina.bat and works well.