Tech

Combine multiple jars into one

To combine multiple (say 20+) jar files, for example all jersey related, into one large jar file, for easier tomcat deployment, one can do the following with ANT: (assuming ant is already installed) 1: create a temporary directory: C:\tmp 2: copy all the jar files into C:\tmp\lib 3: create a new file, C:\tmp\build.xml 4: in… Continue reading Combine multiple jars into one

Tech

REST API on Tomcat: Jersey 2, the most basic setup

I have been using Apache CXF on tomcat for years, for its excellent SOAP support. Finally decided to switch to REST, and tried to get Jersey 2 to work, side by side with CXF. 1) in web.xml, add 2) Write a REST handler: 3) With the above two, and all the required jars in Tomcat's… Continue reading REST API on Tomcat: Jersey 2, the most basic setup