[Jersey] Re: Tomcat can't load com.sun.jersey.spi.container.servlet.ServletContainer, but Glasfish can

From: Glen Mazza <>
Date: Wed, 15 Feb 2012 15:40:53 -0500

On 02/15/2012 02:33 PM, Sven Strittmatter wrote:

> What do You mean by Mavenizing? My project is already a Maven project.
> I only do Maven projects. I don't like working with Java building all
> by hand ;)
>> The Maven samples don't need to mention individual
>> dependencies because they are defined in the contract (the pom.xml) and
> That's also why I use Maven. But all examples I found in the web does
> not have a Maven dependency on jersey-servlet. They only depend on
> jersery-server and some on jersey-json (if they use the JSON stuff).
> In the example You gave me
> (
> I can't see a jersey-servlet dependency. You say "they are defined in
> the contract (the pom.xml)" so there need to be this dependency, or
> not? I'm confused.

Oops, sorry, I gave you an out-of-date link--that's from the older
Jersey 1.7. I was using the (latest) Jersey 1.11 samples, which indeed
has the jersey-servlet dependency for this simple-servlet (line 94):

That's why it was working for me OOTB on Tomcat with the instructions I
gave you.

Trunk is also up-to-date:


Glen Mazza
Talend Community Coders -