Web services with Maven + Jersey + Tomcat + Eclipse

After several days of banging my head into a wall, I’ve succeeded in building a “Hello World” web service using Maven, Jersey, Tomcat, and Eclipse, and gaining some understanding of why it works.

Initially I found plenty of pages that explain how to use 3 of the 4 things I needed: Jersey + Tomcat + Eclipse, Maven + Jersey + GlassFish, Maven + Jersey + Grizzly, etc.  …or the instructions were for old versions. Also, all of them assumed I knew how to setup each tool independently, so they glossed over things like how to point Maven to the Central Archetype Catalog, or how to set all the proxy information each tool needs.

So, after many visits to Stack Overflow and many false starts, I’ve compiled what I learned into Create a Jersey Web Project Using Maven, Tomcat, and Eclipse. Since it refers to separate instructions for setting up Java, Eclipse, Tomcat, and Maven, I’ve put instructions for each of those tools under the Needhamia How To menu, in the upper right of this page.

Next step: adding MongoDB to the project!