title: No mapping found for HTTP request with URI
body: <p>I recently started to learn spring mvc and I got stuck at the beginning. 
  I have a newbie question but I didn't find any solution yet, or in other worlds; none of found solution worked. 
  So, I try to make my first simple spring mvc application that prints some text after clicking the link but when i run application i get <code>http 404</code> and in glassfish logs; <code>No mapping found for HTTP request with URI [/testApp/] in DispatcherServlet with name 'example'</code></p>
  
  <p>I think that I messed something with configuration but I cannot figure out what ;/
  Here 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;servlet&gt;
      &lt;servlet-name&gt;example&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;example&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p></p>
  
  <p>example-servlet.xml;</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:p="http://www.springframework.org/schema/p"
  xmlns:context="http://www.springframework.org/schema/context"
  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"&gt;
  
  &lt;context:component-scan
      base-package="controller" /&gt;
  
  &lt;bean id="viewResolver"
      class="org.springframework.web.servlet.view.UrlBasedViewResolver"&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;
  </code></pre>
  
  <p></p>
  
  <p>and HelloWorldController class;</p>
  
  <pre><code>@Controller
  public class HelloWorldController {
  
      @RequestMapping("/hello")
      public ModelAndView helloWorld() {
          String message = "Hello world spring";
          return new ModelAndView("hello", "message", message);
      }
  }
  </code></pre>
  
  <p>I have <code>hello.jsp</code> inside <code>WEB-INF/jsp</code> and <code>index.jsp</code>, <code>web.xml</code> and <code>example-servlet.xml</code> inside <code>WEB-INF</code>. 
  I would much appreciate for any help.
  thank you from advance.
  @EDIT:
  Request mapping works like charm but still welcome page isn't working. 
  My project structure looks like this:</p>
  
  <pre><code>-webapp
  -WEB-INF
  --jsp
  ---hello.jsp
  --example-servlet.xml
  --web.xml
  -index.jsp
  </code></pre>
  
  <p>tl;dr
  I have my welcome page <code>index.jsp</code> in <code>webapp</code> directory and rest in <code>WEB-INF</code> and <code>WEB-INF/jsp</code>
  I have added welcome-page to web.xml:</p>
  
  <pre><code> &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  
  <p>And still after typing <code>http://localhost:8080/testApp/</code> get http 404.
  @EDIT:
  When I request <code>http://localhost:8080/testApp/index.jsp</code> everything works ok.</p>