March 19, 2010
Kohsuke Kawaguchi: Hudson Hackathon Day 1.
Hudson Hackathon Day 1 is over, and I'm just back to the office.
More »
March 19, 2010
New process for subscribing/unsubscribing to jsr-314-open@jcp.org.
My last blog
entry about JSR-314-OPEN@JCP.ORG was over a year ago. This list is the official Expert Group (EG) mailing list on which the development of the JSR-314 specification (JSF 2.0) is discussed. The
information on how to subscribe/unsubscri...
More »
|
 |
URL patterns are more flexible in Jersey than in the web.xml
Rule of thumb: Avoid to use {variables} as the first path of a
Jersey's @Path
I am working on the Arena PUJ Project, a RESTful web-service to
support PUJ competitions. We are in the early stages of the project but
we already got some resources published on the web. Let me show you a
few URL samples:
An insecure GET method to read all competitions promoted by a
JUG:
GET /{competition_id}/homework
Sample URL: http://fgaucho.dyndns.org:8080/arena-http/institution/cejug/competition
curl -v -H "Accept: application/json" -XGET
http://fgaucho.dyndns.org:8080/arena-http/institution/cejug/competition
An insecure GET method to read all homeworks from a competition
name:
GET /{competition_id}/homework
Sample URL: http://fgaucho.dyndns.org:8080/arena-http/PUJCE-08/homework
curl -v -H "Accept: application/json" -XGET
http://fgaucho.dyndns.org:8080/arena-http/PUJCE-08/homework
A secure method for creating a new homework. In the PUJ business
model, only professors can submit a homework.
POST /{competition_id}/homework/{homework_id}
Sample URL:
http://fgaucho.dyndns.org:8080/arena-http/PUJCE-08/homework/newHomework
curl -v -H "Accept: application/json" -XPOST
http://fgaucho.dyndns.org:8080/arena-http/PUJCE-08/homework/newHomework
The problem: you cannot map variables in the beggining of the
path in the web.xml
In Jersey, all the above URLs are valid, actually Jersey can also
use regular expressions to map...
Date: September, 17 2009
Url: http://www.java.net/blog/felipegaucho/archive/2009/09/17/url-patterns-are-more-flexible-jersey-webxml
Others News
Leave a Reply
Related
- Simple Flex Webapp ... form</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>spring-flex</servlet-name> <url-pattern ...
|
1.An insecure GET method to read all competitions promoted by a JUG.
2.An insecure GET method to read all homeworks from a competition name.
3.A secure method for creating a new homework. In the PUJ business model, only professors can submit a homework.