title: rest with jersey struts2 spring3 not working
body: <p>I am trying to expose webservice using jersey for a struts2 spring3 web application </p>
  
  <p><strong>my web.xml</strong></p>
  
  <pre><code>    &lt;servlet&gt;
          &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sun.jersey.spi.spring.container.servlet.SpringServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
              &lt;param-value&gt;com.vxl.appanalytix.service.impl&lt;/param-value&gt;
          &lt;/init-param&gt;
         &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
              &lt;param-value&gt;true&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;Jersey REST Service&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>In <strong>struts.xml</strong> i have added excludePattern</p>
  
  <pre><code>&lt;constant name="struts.action.excludePattern" value="/rest/.*" /&gt;
  </code></pre>
  
  <p><strong>service class</strong></p>
  
  <pre><code>@Path("/requirement")
  @Service("dimRequirementManager")
  public class DimRequirementManagerImpl extends GenericManagerImpl&lt;DimRequirement, Long&gt; implements DimRequirementManager {
      @Autowired
      DimRequirementDao dimRequirementDao;
      @GET
      @Path("count")
      @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
  public DimRequirement getDimRequirement(){
      DimRequirement dimRequirement = new DimRequirement();
      dimRequirement.setClientKey(123L);
      dimRequirement.setPriority("HIGH");
  
      return dimRequirement;
  }}
  </code></pre>
  
  <p><strong>dependency</strong></p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey.contribs&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-spring&lt;/artifactId&gt;
              &lt;version&gt;1.17.1&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>I am passing the below url in the restclient <code>http://localhost:8080/app-web/rest/requirement/count</code> its returning </p>
  
  <pre><code>Status Code: 404 Not Found
  Content-Language: en
  Content-Type: text/html;charset=utf-8
  Date: Wed, 25 Sep 2013 05:47:27 GMT
  Server: Apache-Coyote/1.1
  Transfer-Encoding: chunked
  </code></pre>
  
  <p>when debuging control is not going to the <strong>getDimRequirement()</strong></p>