Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install and use jersey on Eclipse

In my Web service I use eclipse, java 1.5, spring. now I want to use jersey for REST and downloaded the jersey as a bundle jar from this address:

http://jersey.java.net/nonav/documentation/latest/chapter_deps.html

How can I add this jar to my project and start using the JAX-rs annotations, I added to buildpath but seems like does not work.

Also is it necessary or a good idea to create JAXB annotated classes of my resource classes and using them with JERSEY?

like image 484
Spring Avatar asked Nov 05 '22 22:11

Spring


1 Answers

Make sure you have jsr-311 jar on your classpath. For example you can download it from here.

Jersey supports JAXB out-of-the-box. It doesn't mean you have to use JAXB. If you need to serialize data to/from xml, using JAXB with Jersey is the most convenient.

like image 84
Tarlog Avatar answered Nov 12 '22 16:11

Tarlog