RESTLET开发实例(二)使用ComponentApplication的REST服务.docVIP

  • 43
  • 0
  • 约7.73千字
  • 约 15页
  • 2017-08-14 发布于重庆
  • 举报

RESTLET开发实例(二)使用ComponentApplication的REST服务.doc

RESTLET开发实例(二)使用ComponentApplication的REST服务.doc

RESTLET开发实例(二) 使用Component、Application的REST服务 本篇文章我们介绍不基于JAX-RS的模式。JAX-RS其实就是一个简单的Application服务。和我们接下来介绍的Application基本一致,唯一不同的地方就是,不使用JAX-RS自动映射为xml。 一、基于ServerResource的REST,来实现JAX-RS中get方法。 1、新建RestApplication Web工程。 然后把相应的restlet的lib下的全部jar加入工程引用中,然后在web.xml,加入如下配置: context-param param-nameorg.restlet.application/param-name param-valueorg.lifeba.ws.app.RestSimpleApplication/param-value /context-param servlet servlet-nameRestletServlet/servlet-name servlet-classorg.restlet.ext.servlet.ServerServlet/servlet-class /servlet servlet-mapping servlet-nameRestletServlet

文档评论(0)

1亿VIP精品文档

相关文档