Java Virtal Machine.net

[ News ] rss

September 18, 2009

Poll Result: Java Is Most Preeminent in Europe. Some voters in this past week's java.net poll questioned whether the question could be answered, but the result showed that a plurality of voters considered Europe to be region where Java has the greatest market share among competing technologi...

More »

September 17, 2009

Sun Collaborates with Software Freedom International to Connect More than 25,000 Developers and Students in 30 Countries for Software Freedom Day 2009. Building on its commitment to empower developers and students across the globe, Sun Microsystems, Inc. (NASDAQ: JAVA) is sponsoring more than 300 community style events in more than 30 countries for Software Freedom Day (SFD) on September 19, 2009. W...

More »

November/2009
SunMonTueWedThuFriSat
1234567
891011121314
151617181920 21
22232425262728
2930     

[ 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

Leave a Reply

Name (required)
Mail (will not be published) (required)
Website
You don't see letters?

Enter the code shown above (required)


Related

  • Simple Flex Webapp ... form</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>spring-flex</servlet-name> <url-pattern ...
©2002-2008Java-Virtual-Machine.net :Java Archive: :Solve Crosswords de fr ru pt es : JVM: :Free PC Download: :Micrometer: