Explicit registration of Jersey servlet ?

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Wed, 17 Feb 2010 20:37:33 -0800

I have a webapp with the following resource:

public class ActorResource {
     @Inject SakilaBean sakila;

     public Actor getActor(@PathParam("id") int id) {
         System.out.println("id: " + id);
         return sakila.findActorById(id);

This is deployed as simplewebapp.war on GlassFish v3.


gives a 404. However adding:

        <servlet-name>Jersey Web Application</servlet-name>

        <servlet-name>Jersey Web Application</servlet-name>

to web.xml, then the resource is available at:


Why Jersey servlet need to be registered explicitly ?

Need Application Server ? Download from