-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 1/14/15 6:46 AM, André Warnier wrote:
> Jose María Zaragoza wrote:
>> Hello:
>> 
>> I would like to create a web filter to forward some requests to 
>> another webserver,
>> 
>> The filter receives an "application/x-www-form-urlencoded"
>> request , inspects the value of a parameter and chooses to
>> forward to another remote webserver ( as a proxy )
>> 
>> I've seen some posts where they open a HttpURLConnection to
>> remote server and send the request. This is right for me, but I'd
>> would like if there is another way ( easier ) to implement it.
>> 
> 
> Hi.
> 
> The only easier way is to do your proxying before the request even
> gets to Tomcat (e.g. via an Apache httpd front-end, which
> conditionally proxies to Tomcat or to the other webserver).  That
> is easier, because Apache httpd already has well-tested and
> widely-used proxy modules built-in.  But of course it depends on
> whether the Apache front-end would be able to test the "parameter"
> you are referring to. (It can do that kind of thing via Apache
> directives such as "SetEnvIf", and via mod_rewrite).

+1000

> For Tomcat, there is no such ready-made Proxy webapp available, so
> you have to do it yourself. That can be relatively simple or quite
> complicated, depending on what the requests are and what the
> proxied-to application is like. There was a thread on this list a
> couple of days ago which was related to a similar case.

This is not a good use of anyone's time, unless they want to start a
new medium-scale project to create a Java webapp-based reverse proxy :)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUtrz/AAoJEBzwKT+lPKRYHSwP/2KYaadoHmHVvz9pOD5BU6ms
hIxEIXboe7PHbonnX0fKSAZbwbw5HlT4+FlTprk2Pxs3ITnwskR10+IOwSFZUoeC
A36YaJGcj2k//qdrSdnTpaD5qtqrOb1TOb/jqtKalHDcggnSua5578cITJ5RoS/F
VbIGcowlqKQizI4tdKWDrSN6L6A221ufzgFCBay4bqUy/uxZid8TCm/axJEamB6j
sW+USeoyVWd5Z0jDUN9stJHu3DlBnGpgNClywGsGVsV0YGP9Sn/88I99d7Ovf2d8
I2K4A8RPbXViTLoZuIAO++Ve5KVpMesZKvJyakWBzH/qY1VRIKKDSG5kdzg0ixkG
5/nE1Zxso8qgGc1jCJKIg6tceJmEYWMK6+5R/iSBmRY45ATvepRkrzWmiVcyyln4
E5sg/G7GLZEIFiVGIUjwlcRIJQWEfx7huTmZgxzmzq5PZGi2kXTGy5qjAUOa3Cen
H3IharFiNO0E8LclhWccjZ3NFWs9dhuxGPukCeVjE9hrD61okXbD4fLxElmnsZUU
MFGtR2sia3uqV4XpobpWyc724lFhleufMOmfBR6+cNd3n63PE+EwuM1UdUrtbRGn
yCOJ9xbIGc+z97GKwcxF+Rd7nkNJLlIU6NbDAbZB0O2Dk+Q5ztLLHag9qOgV374i
AzQr9JxR85rris5ytnCy
=KZAI
-----END PGP SIGNATURE-----

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

Reply via email to