RE: Redirection and creation <was> Re: Container Independence

From: Jerome Louvel <>
Date: Thu, 12 Apr 2007 17:48:40 +0200


> I like the idea of HTTP-agnosticism, but cant we find a happy
> middle for names (that are not already used elsewhere)?

I'm sure we can. Either we vote from a list of acceptable ones or the spec
leads decide for us.

> > return new PermanentRedirect("/target/{orderId}");
> >
> > I like this one too. And the use of a static factory makes
> > this easy to read: return"/target/...");
> How is this more complex?
> ctx.permanentRedirect("/target/{orderId}");
> Because it requires you to expose an injection point for ctx
> unnecessarily.
> Actually, this sort of depends on whether you can send back
> multiple redirects in one response. RTF mentioned 4 different
> types of location headers.
> I know that content-location and location can be used
> together (is content-location considered a redirect?). If
> this is true, I think your idea of using ctx is probably better.

The idea is that the context will be the main communication point between
the environment and the Resource POJO. With the context you will be able to
access raw HTTP headers, manually set the status, the redirection
references, the creation reference, the content location (potentially
different from the resource URI), issue a local redirect.

Best regards,