users@jersey.java.net

Re: [Jersey] Redirect /foo/ to /foo (remove trailing slash)

From: Charles Brooking <public+java_at_charlie.brooking.id.au>
Date: Mon, 07 Sep 2009 22:29:35 +1000

Paul Sandoz wrote:
> Can you log an issue?

Issue 367: Redirect /foo/ to /foo (remove trailing slash)
https://jersey.dev.java.net/issues/show_bug.cgi?id=367

> This is something should be fairly easy to implement in terms of
> redirection, the only tricky aspect is what the user should utilize
> to declare that redirection in the reverse direction should occur for
> a resource (rather than being something that applies to all
> resources)

My understanding is that the current redirection happens whenever a
request's path + "/" equals @Path for some resource. So perhaps the
opposite could happen whenever request.getPath() equals some @Path +
"/". Then no user declaration is necessary.

Later
Charlie