tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Proxy Server
Date Tue, 14 Aug 2007 17:45:03 GMT
The stock answer is to setup mod_proxy under Apache and use Apache to 
front-end load all your requests (details located here)

Note that If you have any appreciable amount of static content (watch your 
jmeter perf nosedive) then you will want to look into implementing mod_jk

If you dont want to go thru the complexity of installing yet another system 
then you can use the tried and true request.getHeader as in
String Referer_value = request.getHeader(HTTP_REFERER)
and redirect the request according to some criteria

if Referer_value == "localhost" (this request is for my server so process 
        String serverURL = request.getParameter("serverURL");
        String deployuri = request.getParameter("deployuri");

            String redirectURL = serverURL + deployuri;

If you've installed Tomcat the example code to retrieve headers is located 

Viel Gluck/
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: <>
To: <>
Sent: Tuesday, August 14, 2007 11:21 AM
Subject: Proxy Server

> Hi,
> I am using a Tomcat 5.5.9 server (only for development) on my local pc, 
> within a company network that is using a proxy server. Problem: My 
> application does http requests to a server were a proxy is required, as 
> well as requests to an
> IP adress were no proxy is required / allowed. I added these 2 lines to my 
> file:
> http.proxyPort=<MYPROXY_PORT>
> http.proxyHost= <MYPROXY_URL>
> If I add these lines, the service that requires the proxy works, however 
> the other service does not work - and vice versa.
> Is there a way to configure Tomcat so that I may use a proxy, but exlude 
> certain URLS, just like you can do in a browser?
> Thanks in advance,
> Marcus
> -- 
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN:
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message