title: Cannot make REST call with url-pattern other than /*
body: <p>I'm trying to do a simple REST Web Application using Tomcat 7, Apache Wink, and the Jackson JSON Processor, but seem to be hitting a wall.  If I look in my web.xml file, I see:</p>
  
  <pre><code>&lt;!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd" &gt;
  
  &lt;web-app&gt;
      &lt;display-name&gt;Example Web Application&lt;/display-name&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;ExampleServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.wink.server.internal.servlet.RestServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
              &lt;param-value&gt;com.dummy.example.server.ExampleApplication&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;ExampleServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Now, if I substitute /* for the URL pattern instead, the REST call works, but when I use /services/*, it fails.  </p>
  
  <p>In my ExampleApplication I see:</p>
  
  <pre><code>package com.dummy.example.server;
  
  import java.util.HashSet;
  import java.util.Set;
  
  import javax.ws.rs.core.Application;
  
  import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
  import org.codehaus.jackson.map.AnnotationIntrospector;
  import org.codehaus.jackson.map.ObjectMapper;
  import org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector;
  import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
  
  public class ExampleApplication extends Application {
  
      /**
       * Get the list of service classes provided by this JAX-RS application
       */
      @Override
      public Set&lt;Class&lt;?&gt;&gt; getClasses() {
          Set&lt;Class&lt;?&gt;&gt; serviceClasses = new HashSet&lt;Class&lt;?&gt;&gt;();
          serviceClasses.add(com.dummy.example.server.services.Employee.class);
          return serviceClasses;
      }
  
      @SuppressWarnings("deprecation")
      @Override
      public Set&lt;Object&gt; getSingletons() {
          Set&lt;Object&gt; s = new HashSet&lt;Object&gt;();
  
          // Register the Jackson provider for JSON
  
          // Make (de)serializer use a subset of JAXB and (afterwards) Jackson annotations
          // See http://wiki.fasterxml.com/JacksonJAXBAnnotations for more information
          ObjectMapper mapper = new ObjectMapper();
          AnnotationIntrospector primary = new JaxbAnnotationIntrospector();
          AnnotationIntrospector secondary = new JacksonAnnotationIntrospector();
          AnnotationIntrospector pair = new AnnotationIntrospector.Pair(primary, secondary);
          mapper.getDeserializationConfig().setAnnotationIntrospector(pair);
          mapper.getSerializationConfig().setAnnotationIntrospector(pair);
  
          // Set up the provider
          JacksonJaxbJsonProvider jaxbProvider = new JacksonJaxbJsonProvider();
          jaxbProvider.setMapper(mapper);
  
          s.add(jaxbProvider);
          return s;
      }
  
  }
  </code></pre>
  
  <p>And in my Employee class, I have:</p>
  
  <pre><code>package com.dummy.example.server.services;
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  
  import org.json.simple.JSONObject;
  
  @Path("/services/employee")
  @Produces(MediaType.APPLICATION_JSON)
  @SuppressWarnings("unchecked")
  public class Employee {
      @GET
      public JSONObject get() {
          JSONObject json = new JSONObject();
          json.put("Name", "Example");
          return json;
      }
  }
  </code></pre>
  
  <p>Any ideas?  I've been banging my head against this for some time now</p>