title: Getting 404 not found error when running spring jpa project on tomcat7
body: <p>I am trying to deploy a spring jpa project on tomcat7 on ubuntu13.04. I started tomcat using <code>sh startup.sh</code>
  and I got the message "Tomcat Started". 
  Before this I copied my ROOT.war to /usr/share/tomcat7/webapps and have given full permission to this folder also. And I can see it is correctly structured.</p>
  
  <p>And below is my web.xml</p>
  
  <pre><code>    &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"&gt;
    &lt;display-name&gt;Test App&lt;/display-name&gt; 
   &lt;servlet&gt;
       &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt; 
       &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; 
   &lt;init-param&gt;
       &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; 
       &lt;param-value&gt;/WEB-INF/mvc-dispatcher-servlet.xml&lt;/param-value&gt; 
       &lt;/init-param&gt;
       &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; 
   &lt;/servlet&gt;
   &lt;context-param&gt;
       &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; 
       &lt;param-value&gt;/WEB-INF/spring/spring-context.xml&lt;/param-value&gt; 
   &lt;/context-param&gt;
   &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt; 
      &lt;url-pattern&gt;/&lt;/url-pattern&gt; 
   &lt;/servlet-mapping&gt;
   &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener class&gt; 
   &lt;/listener&gt;
   &lt;/web-app&gt;
  </code></pre>
  
  <p>And below code is part of my controller:</p>
  
  <pre><code>@Controller
  @RequestMapping("/issue")
  public class IssueController {
  
      @RequestMapping(value="/{userId}", method = RequestMethod.GET)
       function to handle above request
  }
  </code></pre>
  
  <p>Below is my mvc-dispatcher-servlet.xml</p>
  
  <pre><code>&lt;context:component-scan base-package="com.test.hello" /&gt;
  &lt;mvc:annotation-driven content-negotiation-manager="contentNegotiationManager"   /&gt;
         &lt;bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"&gt;
                      &lt;property name="favorPathExtension" value="true" /&gt;
                      &lt;property name="favorParameter" value="true" /&gt;
                      &lt;property name="mediaTypes" &gt;
                          &lt;value&gt;
                              json=application/json
                              xml=application/xml
                          &lt;/value&gt;
                      &lt;/property&gt;
        &lt;/bean&gt;
  
      &lt;bean
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix"&gt;
              &lt;value&gt;/WEB-INF/pages/&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="suffix"&gt;
              &lt;value&gt;.jsp&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>But now when I am running <code>http://localhost:8080/issue/1</code>, I am getting 404 page not found.</p>