users@jersey.java.net

Re: [Jersey] URL pattern for * ?

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 16 Sep 2009 13:10:04 -0400

I think the problem is that web.xml isn't as expressive as you'd like.
I think only a trailing * or *.something is supported. My guess is
that if you tried:

curl -v -H "Accept: application/json" -XPOST http://fgaucho.dyndns.org:8080/arena-http/*/homework/teste

then you might hit the auth constraint.

Marc.

On Sep 16, 2009, at 11:58 AM, Felipe Gaścho wrote:

> @Path("{puj}/homework")
> public class PujHomeworkResource {
> @POST
> @Path("{acronym}")
> public PujHomeworkEntity create(@PathParam("puj") String name,
> @PathParam("acronym") String acronym) { ...... }
> }
>
> what is the pattern to the method create ??
>
> The test curl command is something like:
>
> curl -v -H "Accept: application/json" -XPOST
> http://fgaucho.dyndns.org:8080/arena-http/PUJCE-08/homework/teste
>
> but it passed direct.. without authentication error ...
>
> I tried in my web.xml
>
> <url-pattern>/*/homework/*</url-pattern>
>
> without success :(
>
>
> <web-resource-collection>
> <web-resource-name>Create Homework is restricted to
> Professors</web-resource-name>
> <description />
> <url-pattern>/*/homework/*</url-pattern>
> <http-method>POST</http-method>
> </web-resource-collection>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>