Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've installed Apache Tomcat and want to use a proxy for my webapps. Some apps request data from the internet, they don't have an own/internal possibility to use a proxy.

I added the following lines at the beginning of my startup.sh:

CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyHost=foo.bar" 
CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyPort=3128"

But these settings don't seem to work.

Server version: Apache Tomcat/7.0.34

JVM Version: 1.6.0_24-b24

Ubuntu 10.04.4

share|improve this question

1 Answer 1

please check if those catalina opts are loaded and where. It's safer to use java_opts , or create an environment variables JAVA_OPTS with that value "-Dhttp.proxyHost=proxy.com -Dhttp.proxyPort=8080 ". Also make sure you know what JRE is used. Sometimes tomcat loads one of his own. I used it in both ways and it worked. You can also setup the proxy dynamically at runtime, but that is nasty.

Cheers, Nicu

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.