Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

configuring Tomcat to use Proxy Server

Thread view: 
Christine Mayer - 06 Jul 2007 14:32 GMT
To connect to web services, web pages and so on, I need to use a proxy
server. To make my application work, I need to adjust Tomcat so that
it uses my proxy server. I tried to adjust catalina.bat -
There is a variable "JAVA_OPTS". I added my proxy server by adding:
-Dhttp.proxyHost=www-my.proxy.server.com -Dhttp.proxyPort=8080

However, it doesn't work. I also tried to echo the variable's conntent
on the tomcat console,
but this neither worked. Any ideas how to add a proxy server in
tomcat? Maybe I am looking in the wrong direction??

Thanks in advance,

Christine
Manish Pandit - 06 Jul 2007 15:12 GMT
> To connect to web services, web pages and so on, I need to use a proxy
> server. To make my application work, I need to adjust Tomcat so that
[quoted text clipped - 10 lines]
>
> Christine

It is not so much of adding proxy to tomcat, but setting up the jvm
running tomcat to recognize the proxy settings. If you tried printing
the values and nothing showed up, JAVA_OPTS did not get picked up. You
might want to try using API instead of passing it as JAVA_OPTS (that
should work too, but no harm trying alternate route). If you have a
bootstrap class, have it read a properties file and set the system
properties for proxy :

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

-cheers,
Manish
Christine Mayer - 06 Jul 2007 16:06 GMT
Well, I am completly new to the system,
and I need to start at some point! ;-)
Going deep into the Java files just to add the proxy will let me lose
the scope imho.
About the Java JVM, I don't understand it anyway, as in my system
settings the java console is set to "use browser proxy configuration"
- so imho it should actually use the proxy, or is that something
else???

About printing from the batch file, well, I doesn't print anything at
all, even if I just say "echo helloooo" in the very first line. I am
not in expert in batch files, though, and maybe this tomcat batch file
does something that prevents my echo to appear in the tomcat console...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.