users@jersey.java.net

web.xml url-pattern and _at_PathParam

From: Ronak Patel <ronak2121_at_yahoo.com>
Date: Wed, 13 May 2009 03:03:02 -0700 (PDT)

Hi All, I'm using Jersey 1.0.3 and came across a weird problem. My web application is a mixture of a JSP page and the main REST web application. To accomodate both in the same web.xml, my web.xml structure for my REST web application is as follows: <servlet><display-name>sno</display-name><servlet-name>sno</servlet-name><servlet-class>com</servlet-class><load-on-startup>1</load-on-startup></servlet><servlet-mapping><servlet-name>sno</servlet-name><url-pattern>/forecast/*</url-pattern> <url-pattern>/surface/*</url-pattern> <url-pattern>/weather/*</url-pattern>   Code as follows always results in an HTTP 404:  @Controller_at_Path("/nation/{nationId}/")publicclassNationController {_at_GET@Produces("application/xml")publicResponse getNationByNationId( {_at_PathParam("nationId") finalLong nationId)} }   All of the following URLs fail:   /nation /nation/ /nation/1 /nation/1/   I would assume all 4 of these URIs would work. Why doesn't Jersey match these uri properly?   Ronak <url-pattern>/region/*</url-pattern></servlet-mapping>.sun.jersey.spi.spring.container.servlet.SpringServlet