title: HTTP Status 404 in RequestMapping in Spring
body: <p>I am programming a spring application using Request Mapping annotation. <code>http://localhost:8080/SpringMVC/hello</code> give a 404(The requested resource is not available).Logging data from server  `No mapping found for HTTP request with URI [/SpringMVC/WEB-INF/jsp/helloView.jsp] in DispatcherServlet with name 'dispatcher'.
  Could someone help.</p>
  
  <p>Project structure
  <img src="https://i.stack.imgur.com/i5O2I.png" alt="enter image description here"></p>
  
  <pre><code>@Controller 
      @RequestMapping(value="/hello")
      public class HelloController 
      {
      @RequestMapping(method=RequestMethod.GET) 
      public ModelAndView sayHello() 
      {
      ModelAndView view=new ModelAndView("helloView","HelloMessage", "Welcome"); 
      return view; 
      }
  
      }
  </code></pre>
  
  <p>helloView.jsp</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Spring  Application&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;h2&gt;${HelloMessage}&lt;/h2&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;web-app version="2.5" 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"&gt;
  
  &lt;servlet&gt;
  &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
  &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; 
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/*&lt;/url-pattern&gt;  
  &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>dispatcher-servlet.xml</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-3.0.xsd
  http://www.springframework.org/schema/mvc
  http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
  http://www.springframework.org/schema/aop
  http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  http://www.springframework.org/schema/tx
  http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"&gt;
  &lt;!-- Scans the classpath of this application for @Components to deploy as beans --&gt;
  
      &lt;context:component-scan base-package="controller" /&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean id="jspViewResolver"
              class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
              &lt;property name="viewClass"
                      value="org.springframework.web.servlet.view.JstlView" /&gt;
              &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
              &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>