You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Conway Liu <cl...@xtra.co.nz> on 2011/02/21 04:15:54 UTC

Connecting to other internet sites from a Tomcat application via a proxy server

Hi,

Previously our Tomcat application can create https requests and send the request 
to other website, which sends response back to our application with required 
data.

Now our Tomcat appcation has been migrated to a server that is not allowed to 
send the requests directly to the internet, but rather needs to send through a 
proxy server, kind of like specifying a proxy server in web browsers.

How do I tell Tomcat that "When you need make a https connection, please do it 
via this proxy server"?

I have read http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html but not 
quite understand it. I think I almost need a tutorial type of instructions to 
get it done correctly, like which file to modify, what text to put into 
it...etc.

Any one able to help this poor soul?

You're very much appreciated
Conway Liu

RE: Connecting to other internet sites from a Tomcat application via a proxy server

Posted by Conway Liu <cl...@xtra.co.nz>.
Thanks Andre, I'll have a look.
Conway

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Monday, 21 February 2011 8:47 p.m.
To: Tomcat Users List
Subject: Re: Connecting to other internet sites from a Tomcat application
via a proxy server

Conway Liu wrote:
> Hi,
> 
> Previously our Tomcat application can create https requests and send the
request 
> to other website, which sends response back to our application with
required 
> data.
> 
> Now our Tomcat appcation has been migrated to a server that is not allowed
to 
> send the requests directly to the internet, but rather needs to send
through a 
> proxy server, kind of like specifying a proxy server in web browsers.
> 
> How do I tell Tomcat that "When you need make a https connection, please
do it 
> via this proxy server"?
> 
You do not have to tell Tomcat anything, as Tomcat has nothing to do with
the matter.
It is your application which needs to be told.
To make its connection to the external server, the application uses java
"network" 
classes. It is those classes you need to look at, and set up properly.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Connecting to other internet sites from a Tomcat application via a proxy server

Posted by André Warnier <aw...@ice-sa.com>.
Conway Liu wrote:
> Hi,
> 
> Previously our Tomcat application can create https requests and send the request 
> to other website, which sends response back to our application with required 
> data.
> 
> Now our Tomcat appcation has been migrated to a server that is not allowed to 
> send the requests directly to the internet, but rather needs to send through a 
> proxy server, kind of like specifying a proxy server in web browsers.
> 
> How do I tell Tomcat that "When you need make a https connection, please do it 
> via this proxy server"?
> 
You do not have to tell Tomcat anything, as Tomcat has nothing to do with the matter.
It is your application which needs to be told.
To make its connection to the external server, the application uses java "network" 
classes. It is those classes you need to look at, and set up properly.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org