users@jersey.java.net

[Jersey] Re: Jersey on Heroku

From: Robert DiFalco <robert.difalco_at_gmail.com>
Date: Fri, 14 Mar 2014 07:32:34 -0700

Yes this filter updates the injected UriInfo to more closely reflect what the client sent.

Sent from my iPhone

> On Mar 14, 2014, at 2:39 AM, Vetle Leinonen-Roeim <vetle_at_roeim.net> wrote:
>
>> On 12.03.14 22:54, Robert DiFalco wrote:
>> I am deploying Jersey on Heroku. So I have created a
>> ContainerRequestFilter that resets the Base and Request URI based on the
>> scheme and port that heroku forwarded.
>>
>> On Jetty I did not have to set the port but on Grizzly I do.
>>
>> Okay the question. Is this following the best way to achieve this? Am I
>> doing anything naive here?
>
> If you inject UriInfo in your resources, and do UriInfo.getBaseUriBuilder, it will still return the original URI?
>
> Or does the call to ctx.setRequestUri change what is returned from UriInfo.getBaseUriBuilder()?
>
>
> [...]
>
> Regards,
> Vetle
>