users@glassfish.java.net

Wildcard URL matching when using HTTPBinding

From: <glassfish_at_javadesktop.org>
Date: Fri, 27 Apr 2007 17:16:21 PDT

I've been looking through the Glassfish source for the deployment descriptors, and it doesn't appear that there is a way to customize the servlet-mapping when generating internal web.xml file.

I am building a RESTful web service, and would prefer to use URL patterns instead of query string parameters. (ie, GET /rest/Product/1234 and not GET /rest?t=Product&pid=1234).

So, I would like to be able to do have the web.xml mapping look more like:

  <servlet-mapping>
    <servlet-name>ApiREST</servlet-name>
        <url-pattern>/rest</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
      <servlet-name>ApiREST</servlet-name>
[b] <url-pattern>/rest/*</url-pattern>[/b]
  </servlet-mapping>

Is there any way to do this in the annotations that I'm missing? Or do I need to deploy my own web.xml, webservices.xml, wsdl, etc and all the other stuff that goes with having to do that?
[Message sent by forum member 'cparis' (cparis)]

http://forums.java.net/jive/thread.jspa?messageID=214752