简体   繁体   English

无法在netbeans 7.3.1中使用特定于泽西的功能

[英]unable to Use jersey specific features in netbeans 7.3.1

I am developing an web application using rest web services. 我正在使用其他Web服务开发Web应用程序。 I am using netbeans. 我正在使用netbeans。 After creating the web application wizards, for creating web service 1. new-> RESTful web service from patterns -> simple root resource 2. after filling class name, package and all details, netbeans has usually option for 创建Web应用程序向导后,用于创建Web服务1. new-> RESTful Web服务从模式 - >简单的根资源2.在填写类名,包和所有细节之后,netbeans通常选择

Use Jersey Specific Feature

In my office PC this option is there. 在我的办公室电脑中有这个选项。 I have install the same version of netbeans at home PC, but I am not seeing the above Use Jersey Specific feature option. 我在家用PC上安装了相同版本的netbeans,但我没有看到上面Use Jersey Specific feature选项。

I have tried with adding jersey-core-1.13.bundle in the library as found it while googling around, but it didn't work. 我试过在库中添加jersey-core-1.13.bundle,但是在google搜索时发现它,但它没有用。 I am using netbeans 7.3.1 and JavaEE 7 我正在使用netbeans 7.3.1和JavaEE 7

How should I do the same? 我该怎么做?

Hi this use jersey feature option is coming in specific configurations of jersey/JEE/Netbean. 嗨这个使用泽西功能选项是针对泽西/ JEE / Netbean的特定配置。 It's referenced as a bug on netbeans. 它被引用为netbeans上的一个bug。 It's well explained in a netbean post. 它在netbean帖子中得到了很好的解释。 Please take a look at netbean reference bug 请看一下netbean参考错误

NETBEAN BUG EXTRACT : NETBEAN BUG EXTRACT:

It's working as designed. 它按设计工作。 We support REST configuration by using javax.ws.rc.core.Application subclass only. 我们仅使用javax.ws.rc.core.Application子类来支持REST配置。

The "Use Jersey Specific features" panel(section) was removed for JavaEE 7 we applications, or in JavaEE 6 when Jersey 2.0 is detected on classpath. 对于JavaEE 7我们的应用程序,或者在类路径中检测到Jersey 2.0时,在JavaEE 6中删除了“使用Jersey特定功能”面板(部分)。

Thus, the use cases are the following: 因此,用例如下:

1.JavaEE 7 (JAX-RS 2.0): - javax.ws.rc.core.Application subclass configuration 1.JavaEE 7(JAX-RS 2.0): - javax.ws.rc.core.Application子类配置

  1. JavaEE 6 + Jersey 2.0 on classpath (eg GlassFish 4 or Tomcat with Jersey 2.0) 类路径上的JavaEE 6 + Jersey 2.0(例如GlassFish 4或带有Jersey 2.0的Tomcat)

    • javax.ws.rc.core.Application subclass configuration javax.ws.rc.core.Application子类配置
  2. JavaEE 6 + Jersey 1.x on classpath (eg GlassFish 3.1) 类路径上的JavaEE 6 + Jersey 1.x(例如GlassFish 3.1)

    • javax.ws.rc.core.Application subclass configuration or javax.ws.rc.core.Application子类配置或
    • Jersey specific configuration using web.xml Jersey使用web.xml进行特定配置

Note: this is the only case, when "Use Jersey Specific features" panel is available 注意:这是唯一的情况,当“使用泽西特定功能”面板可用时

  1. JavaEE 5 + Jersey 2.0 on classpath 类路径上的JavaEE 5 + Jersey 2.0
    • Jersey specific configuration using web.xml Jersey使用web.xml进行特定配置

The general approach with REST is to get rid of Jersey specific stuff as most as possible, and use rather JAX-RS only. REST的一般方法是尽可能地摆脱Jersey特定的东西,而只使用JAX-RS。

Ken, could you please update the tutorial, and remove the "Use Jersey specific features" section (bottom wizard panel in step 5). Ken,您能否请更新教程,并删除“使用Jersey特定功能”部分(步骤5中的底部向导面板)。 Also the next panel in step 5 ("Rest Resources Configuretion" panel) was removed, and is not available anymore. 此外,步骤5中的下一个面板(“Rest Resources Configuretion”面板)已被删除,现在不再可用。

enjoy :) 请享用 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM