jax-rs(Java API for RESTful Web Services)实践教程 之二 —— get/post/put/delete/head
来源:互联网 发布:js获取元素属性的办法 编辑:程序博客网 时间:2024/05/21 22:54
转载请注明出处,谢谢 http://blog.csdn.net/exsuns
新建一个web工程:
新建类com.Hello.java ,内容如下
最后部署到服务器,并启动
客户端:
打开客户端进行测试,就会在出现结果。
get/post/delete/put 都会出现结果
不过head有可能不会出现
关于head请求,sun有一句话
By default the JAX-RS runtime will automatically support the methodsHEAD, if not explicitly implemented. For HEAD the runtimewill invoke the implemented GET method (if present) and ignore theresponse entity (if set).
默认请况下 jax-rs运行时会自动支持head和options请求,如果没有明确实现,head运行时会调用get,同时会忽略response写出
- jax-rs(Java API for RESTful Web Services)实践教程 之二 —— get/post/put/delete/head
- jax-rs(Java API for RESTful Web Services)实践教程 之二 —— get/post/put/delete/head
- jax-rs(Java API for RESTful Web Services) 实践教程 之一 —— 初探jax-rs
- jax-rs(Java API for RESTful Web Services) 实践教程 之三 —— 生产Produces与消费Consumes
- jax-rs(Java API for RESTful Web Services) 实践教程 之五 —— 注入全局变量 和 rest的生命周期
- jax-rs(Java API for RESTful Web Services) 实践教程 之四 —— @Context注入HttpServletRequest 使REST保持状态!
- JAX-RS -- Java API for RESTful Web Services
- jax-ws(Java API for XML Web Services)实践教程
- jax-ws(Java API for XML Web Services)实践教程
- RESTful Request:GET/PUT/DELETE/POST/HEAD/OPTIONS【转】
- RESTful Request:GET/PUT/DELETE/POST/HEAD/OPTIONS
- RESTful Request:GET/PUT/DELETE/POST/HEAD/OPTIONS
- restful,RESTful API 设计,GET/PUT/DELETE/POST
- Restful Web services(jax-Rs)
- RESTful Web Services -- JAX-RS中的注解
- RESTful Web 服务四种操作POST/DELETE/PUT/GET
- RESTful Web 服务四种操作POST/DELETE/PUT/GET
- RESTful Web 服务四种操作POST/DELETE/PUT/GET
- 几种常用的文件加密方法
- javascript中的test方法
- C++在线编译器
- Indy10.2.5的危险做法
- 自己用网络资源
- jax-rs(Java API for RESTful Web Services)实践教程 之二 —— get/post/put/delete/head
- 软件自动化编译脚本初步
- The Elements of Programming Style
- SQL常用命令使用方法
- 轮询法在混合消息通信中的缺陷
- Reader和Writer类
- 【20091120】水晶报表的使用经验和资料总结
- 判断整数序列是不是二元查找树的后序遍历结果
- 数学公式大全