I am developing an web application using rest web services. I am using 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
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.
I have tried with adding jersey-core-1.13.bundle in the library as found it while googling around, but it didn't work. I am using netbeans 7.3.1 and JavaEE 7
How should I do the same?
Hi this use jersey feature option is coming in specific configurations of jersey/JEE/Netbean. It's referenced as a bug on netbeans. It's well explained in a netbean post. Please take a look at netbean reference bug
NETBEAN BUG EXTRACT :
It's working as designed. We support REST configuration by using javax.ws.rc.core.Application subclass only.
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.
Thus, the use cases are the following:
1.JavaEE 7 (JAX-RS 2.0): - javax.ws.rc.core.Application subclass configuration
JavaEE 6 + Jersey 2.0 on classpath (eg GlassFish 4 or Tomcat with Jersey 2.0)
- javax.ws.rc.core.Application subclass configuration
JavaEE 6 + Jersey 1.x on classpath (eg GlassFish 3.1)
- javax.ws.rc.core.Application subclass configuration or
- Jersey specific configuration using web.xml
Note: this is the only case, when "Use Jersey Specific features" panel is available
- JavaEE 5 + Jersey 2.0 on classpath
- Jersey specific configuration using 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.
Ken, could you please update the tutorial, and remove the "Use Jersey specific features" section (bottom wizard panel in step 5). Also the next panel in step 5 ("Rest Resources Configuretion" panel) was removed, and is not available anymore.
enjoy :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.