Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

April/2024
SunMonTueWedThuFriSat
 123456
78910111213
1415161718 1920
21222324252627
282930    

[ Archives News
for 'Java Technology' ]

home > news > java technology > url patterns are more flexible in jersey than in the web.xml

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

©2002-2019Java-Virtual-Machine.net https://mobirise.com/ | es | best web design software | website designing software | Free Bootstrap Template