users@jersey.java.net

Re: [Jersey] Response.seeOther is url encoding my "?" character. How to avoid this ?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 09 Nov 2009 09:02:26 +0100

On Nov 7, 2009, at 4:12 PM, Felipe Gaúcho wrote:

> return Response.seeOther(URI.create(nextUri)).build();

The seeOther method takes a URI as an argument:

   https://jsr311.dev.java.net/nonav/javadoc/javax/ws/rs/core/Response.html
#seeOther%28java.net.URI%29

>
> On Sat, Nov 7, 2009 at 3:10 PM, Gavin Bong <malaisien_at_gmail.com>
> wrote:
>> In my GET method, I am returning
>>
>> return Response.seeOther( nextUri ).build();
>>
>> But the browser is redirecting to
>>
>> http://twitter.com/oauth/authenticate%3Foauth_token=ajh5rtgyh7yu89io0op


What version of Jersey are you using?

How are you creating the instance of "nextUri"? can you print out that
URI before the "Response.seeOther..." statement?

I want to ascertain if the problem is when you create "nextUri" or it
is a problem converting a relative URI into an absolute URI.

Paul.

>>
>> How do I avoid the escaping of "?" ? Thanks
>>
>> --
>> Sincères salutations,
>>
>> Gavin Bong
>>
>> Rien ne sert d'être vivant, s'il faut qu'on travaille - André Breton
>> If you do things well, do them better. Be daring, be first be
>> different, be just. - Anita Roddick
>> http://amour.zaadz.com/blog
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
>
>
> --
> Looking for a client application for this service:
> http://fgaucho.dyndns.org:8080/arena-http/wadl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>