dev@jsr311.java.net

RE: Removing _at_UnmatchedPath

From: Jerome Louvel <jerome.louvel_at_noelios.com>
Date: Wed, 4 Jul 2007 08:11:20 +0200

+1

Best regards,
Jerome

> -----Message d'origine-----
> De : Marc.Hadley_at_Sun.COM [mailto:Marc.Hadley_at_Sun.COM]
> Envoyé : lundi 2 juillet 2007 22:18
> À : dev_at_jsr311.dev.java.net
> Objet : Removing @UnmatchedPath
>
> The @UnmatchedPath annotation was intended to be used to provide
> access to the unmatched part of a URI path thus:
>
> @UriTemplate("folders")
> public class Path {
>
> @HttpMethod(GET)
> public Response getContent(@UnmatchedPath String path) {
> ...
> }
> }
>
> On further thought we think a cleaner and more intuitive solution
> would be to add a property to UriTemplate that would enable
> "greedy" (can anyone think of a better word) matching for a
> terminating URI template parameter. E.g.
>
> @UriTemplate(value="folders/{path}" greedy=true)
> public class Path {
>
> @HttpMethod(GET)
> public Response getContent(@UriParam("path") String path) {
> ...
> }
> }
>
> Using the above and a request for folders/foo/bar, the value of path
> would be "foo/bar".
>
> Thoughts, comments ?
> Marc.
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>