How to generate WADL file using Jersey 1.7(如何使用 Jersey 1.7 生成 WADL 文件)
问题描述
我创建了一个 hello world REST 服务,现在我想生成 WADL 文件.
I created a hello world REST service and now I d like to generate the WADL file.
我环顾四周,发现我可以通过调用来做到这一点:
I looked around and saw that I can do so by calling :
http://localhost:8090/application.wadl
但是我没有得到任何东西.我正在使用带有 Eclipse Indigo 的 Jersey 1.7 并在 Apache 7 上运行
However I dont get anything in my case. I am using Jersey 1.7 with Eclipse Indigo and running on Apache 7
我也试过打电话:
http://localhost:8090/<myapplication_name>.wadl
但仍然没有结果.
Jersey 1.7 是否支持此功能?如果是,我做错了什么?
Is this feature supported by Jersey 1.7? If yes what do i do wrong?
web.xml 文件如下所示:
The web.xml file looks like this:
谢谢
推荐答案
你的应用在 Apache 中的名称是什么,即context"?假设名称是restApp".试试这个:
What is the name of your app in Apache, i.e., "context"? Assume the name is "restApp". Try this:
http://localhost:8090/restApp/application.wadl
或者,如果你的 servlet 映射是:
Or, if you servlet mapping is:
<servlet-mapping>
<servlet-name>RESTService</servlet-name>
<url-pattern>/company/rest/*</url-pattern>
</servlet-mapping>
..它会是:
http://localhost:8090/restApp/company/rest/application.wadl
这篇关于如何使用 Jersey 1.7 生成 WADL 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 Jersey 1.7 生成 WADL 文件


- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01