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

From: Dhanji R. Prasanna <>
Date: Thu, 12 Apr 2007 23:40:48 +1000

On 4/12/07, Jerome Louvel <> wrote:
> Dhanji,
> As REST is the architectural style of the Web, I think this usage is
> correct, especially because it doesn't restrict us to HTTP per-se and
> allow
> the mapping of other similar protocols to HTTP semantics.

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

> > 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
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.