Code I/O

A topnotch WordPress.com site

5 Minutes on Java : Apache Tomcat and Proxy Settings

1 Comment

Are you writing programs that need to reach out to the Web? Indeed, you’ll be … these programs when run behind a proxy will fail to run.  One will use the Java VM arguments or modify the code to ensure proper working with web proxies.

The same thing can be easily done when you want to host your code in web containers like Apache Tomcat … for instance adding your proxy parameters to $CATALINA_HOME/conf/catalina.properties will resolve issue accessing the web behind a proxy.

http.proxyHost=yourProxyURL
http.proxyPort=yourProxyPort
http.proxyUser=yourUserName
http.proxyPassword=yourPassword

Add the similar entries if you need to access secure http.

https.proxyHost=yourProxyURL
https.proxyPort=yourProxyPort
https.proxyUser=yourUserName
https.proxyPassword=yourPassword

NOTE: proxyUser and proxyPassword are not required in the properties file if proxy is unauthenticated.

Advertisements

One thought on “5 Minutes on Java : Apache Tomcat and Proxy Settings

  1. SSL certificate providers can’t be sleeping well lately. I just read that Google is planning to get into the wildcard SSL certificate business, and begin offering free certificates. That’s certain to shake things up.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s