Sunday, 25 July 2010

REST Webservice URI setup

Thank heavens I found the blog topic http://marxsoftware.blogspot.com/2010/02/jax-rs-with-jersey-introduction.html.

So, here's the setup.

http://hostname/<context root of web application>/<url pattern of the servlet mapping>/<path defined in java class>

http://
hypertext transfer protocol
hostname
the hostname where the web server is lurking
context root of web application
the context root is defined by the proprietary xml file sun-web.xml
url pattern of the servlet mapping
the url pattern defined in the web.xml for a particular servlet, to indicate for which urls the servlet needs to be called
path defined in java class
the path is defined in the java class that is going to function as the REST webservice. It's defined by means of the @Path annotation on the Class itself.

No comments:

Post a Comment