Chekout the undertow server.
You could intercept the all http request and modify the content, header or the url.

12 Mayıs 2014 Pazartesi tarihinde, Rafael Chies <> yazdı:
Of course it isn't, I was just wondering if it has something that could help me to not do some unclean code.

----- Original Message -----
From: "Bill Burke" <>
Sent: Monday, May 12, 2014 11:33:55 AM
Subject: Re: [Resteasy-developers] Intercept Request on Server and redirect to other host

You have to unpack the request and make another seaprate HTTP request,
IMO.  JAX-RS is not a proxy server!

On 5/11/2014 7:00 AM, Rafael Chies wrote:
> Hi Bernard, thanks for your answer.
> It would work if the redirection had to be done for every request. However, my decision for redirect or not is taken on the server, so I asw thinking in intercepting the request with the Resteasy API, verify in it if I have or not to redirect, and if so, I use the own Resteasy API to do this redirection. The problem is I have searched on Resteasy sources but didn't find yet how to do this redirection from the two objects that I have in in hands in my interception (HTTPRequest  and ResourceMethod).
> Thanks,
> ----- Original Message -----
> From: "Bernard Łabno" <>
> To: "Rafael Chies" <>
> Cc:
> Sent: Sunday, May 11, 2014 7:53:29 AM
> Subject: Re: [Resteasy-developers] Intercept Request on Server and redirect to other host
> Sounds Like a job for mod-rewrite.
> 11 maj 2014 12:51 "Rafael Chies" <> napisał(a):
>> Hi folks,
>> I would like to know what is the best approach for intercept a Restful
>> request on Server and so redo this same request but for other application.
>> The URI and body must be the same, the only thing that must be changed are
>> the host, port and context-root.
>> First of all I thought doing that with HTTP redirection, but there are
>> some cases that the redirection is for a POST method, and POST redirection
>> results in a GET request, I don't want this, I want POST being redirected
>> to the same POST request.
>> Any thoughts would be helpful!
>> Thanks in advance,
>> --
>> Rafael Chies
>> Senior Middleware Consultant
>> Red Hat Brazil
>> +55 11 35296000
>> +55 11 996949343
>> Better technology. Faster innovation. Powered by community collaboration.
>> See how it works at
>> ------------------------------------------------------------------------------
>> Is your legacy SCM system holding you back? Join Perforce May 7 to find
>> out:
>> &#149; 3 signs your SCM is hindering your productivity
>> &#149; Requirements for releasing software faster
>> &#149; Expert tips and advice for migrating your SCM now
>> _______________________________________________
>> Resteasy-developers mailing list

Bill Burke
JBoss, a division of Red Hat

"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
Resteasy-developers mailing list