How to update to jersey 2.X on an app using jersey 1.1X?

Posted by Maxrunner on Stack Overflow See other posts from Stack Overflow or by Maxrunner
Published on 2013-10-23T13:35:13Z Indexed on 2013/10/23 15:54 UTC
Read the original article Hit count: 211

Filed under:
|

i recently faced a problem with the handling of exceptions using jersey. In this case it was that the exceptions thrown from Exception mapper are not re thrown to the underlaying container, i searched and found that this has been fixed in the 2.0 version. But i'm using jersey 1.10 and the 2.X dependencies are all different and its also maven based. Since this project is not using maven, how do i use the more recent version?In the 2.X versions there are no jackson json jars for example. So i'm having some doubts in how to upgrade.

Here's my web.xml config entry for jerse

<servlet>
    <servlet-name>Jersey REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
  <init-param>
    <param-name>com.sun.jersey.config.property.packages</param-name>
    <param-value>com.mobile.rest.resources</param-value>
  </init-param>
  <init-param>
           <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
           <param-value>true</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>Jersey REST Service</servlet-name>
  <url-pattern>/rest/*</url-pattern>
</servlet-mapping>  

regards,

© Stack Overflow or respective owner

Related posts about jersey-2.0

Related posts about jersey-1.0