Java Virtal

[ 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 »

1415161718 1920

[ 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: curl -v -H "Accept: application/json" -XGET An insecure GET method to read all homeworks from a competition name: GET /{competition_id}/homework Sample URL: curl -v -H "Accept: application/json" -XGET 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: curl -v -H "Accept: application/json" -XPOST 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

Others News

© free web design software | website designer | website designing software | Bootstrap Templates | bootstrap image slider