首先看看这两篇介绍REST概念的文章:
http://www.ibm.com/developerworks/webservices/library/ws-restful/
http://www.ibm.com/developerworks/cn/java/j-lo-jaxrs/
官网介绍的文章:
http://docs.oracle.com/javaee/6/tutorial/doc/gilik.html
这篇是实践如何搭建一个Restful Web Service:
http://www.vogella.com/articles/REST/article.html
值得注意的是,这个例子用web.xml来配置servlet。但是其实也可以不用web.xml
具体参考下面jersey手册中的2.2节: Deploying a RESTful Web Service:
http://jersey.java.net/nonav/documentation/latest/user-guide.html#d4e483
需要注意的几个概念:
REST
JAX-RS 1.1
jersey
Java defines standard REST support via JAX-RS (The Java API for RESTful Web Services) inJSR 311.
jersey是glassfish的一部分,实现了REST Web Service。