users@jersey.java.net

URL pattern for * ?

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Wed, 16 Sep 2009 17:58:54 +0200

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