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

http://undertow.io/documentation/core/reverse-proxy.html

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

----- Original Message -----
From: "Bill Burke" <bburke@redhat.com>
To: resteasy-developers@lists.sourceforge.net
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" <s4237@pjwstk.edu.pl>
> To: "Rafael Chies" <rchies@redhat.com>
> Cc: resteasy-developers@lists.sourceforge.net
> 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" <rchies@redhat.com> 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 redhat.com
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>> http://p.sf.net/sfu/perforce
>> _______________________________________________
>> Resteasy-developers mailing list
>> Resteasy-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>

--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

------------------------------------------------------------------------------
"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."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Resteasy-developers mailing list