users@jersey.java.net

Re: 303: Browser redirection problem

From: Monika Solanki <m.solanki_at_mcs.le.ac.uk>
Date: Wed, 02 Jun 2010 11:00:03 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Paul Sandoz wrote:
>
> On Jun 2, 2010, at 11:39 AM, Monika Solanki wrote:
>
> I seem to have a problem with this.
>
>>>>>> URI seeOtherUri = ...
>>>>>>> return Response.satus(303).location(seeOtherUri).build():
>
> When I check the response status at the client end, it turns out to be a
> 404.
>
>> Are you sure the method that returns the Response is getting invoked?

Yes.
>
>
> Apparently the client is attaching the seeOtherURI to the base URI
> of the service. How do I fix this at the client end?
>
>
>> What client are you using?

Browser
does the client automatically follow
>> redirected URLs?

I would have thought so
If you have server side logging enabled you might see
>> two requests being performed.

I do see the server trying to redirect to the other URI in the logs, but
 it does not seem to work.

Monika



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwGK6MACgkQef8v4/uRsix6rwCePHj5DxTZM6sHAXxEfGg7tCe5
fKEAniFEtxGnvueSuqFUSYxJ7lsAQl1x
=b8Ra
-----END PGP SIGNATURE-----