title: HTTP Status 404 – Not Found on Tomcat server
body: <p>I'm creating new spring mvc Dynamic Web Project on Eclipse version 4.9.0 Java EE IDE for Web Developers. I'm setting up a new Server Tomcat version 9.0.8.
  When I select <code>hello.jsp</code> and <code>right-click -&gt;Run As -&gt; Run on Server</code>, then <code>hello.jsp</code> works fine,and I access <code>helo.jsp</code>. But When I select project root folder and <code>right-click -&gt;Run As -&gt; Run</code> on Server, then it shows <code>HTTP Status 404</code>  with description:</p>
  
  <blockquote>
    <p>The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.'</p>
  </blockquote>
  
  <p>here is my Web.xml:</p>
  
  <pre><code>     &lt;web-app id = "WebApp_ID" version = "2.4"
         xmlns = "http://java.sun.com/xml/ns/j2ee" 
         xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation = "http://java.sun.com/xml/ns/j2ee 
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
  
      &lt;display-name&gt;Spring MVC Application&lt;/display-name&gt;
      &lt;servlet&gt;
         &lt;servlet-name&gt;HelloWeb&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;HelloWeb&lt;/servlet-name&gt;
           &lt;url-pattern&gt;/&lt;/url-pattern&gt;
       &lt;/servlet-mapping&gt;
       &lt;welcome-file-list&gt;
         &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
         &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
         &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
         &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
         &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
         &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
       &lt;/welcome-file-list&gt;
     &lt;/web-app&gt;
  </code></pre>
  
  <p>Here is my full HelloWeb-servlet.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns = "http://www.springframework.org/schema/beans"
    xmlns:context = "http://www.springframework.org/schema/context"
    xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation = "http://www.springframework.org/schema/beans     
    http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
    http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-4.3.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc.xsd"&gt;
  
    &lt;context:component-scan base-package="com.tutorialspoint"/&gt; 
    &lt;mvc:annotation-driven/&gt;
  
    &lt;bean name="jspViewResolver" 
    class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WebContent/views/"&gt;&lt;/property&gt;
      &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt;
    &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>And here is my Controller:</p>
  
  <pre><code>package com.mypackage;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.ui.ModelMap;
  
  @Controller
  public class HelloController {
     @RequestMapping(path="/hello",method = RequestMethod.GET)
     public String printHello(ModelMap model) {
        model.addAttribute("message", "Hello Spring MVC Framework!");
        return "hello";
     }
  }
  </code></pre>
  
  <p>Here's my directory structure:
  <a href="https://imgur.com/CHKEsJo" rel="nofollow noreferrer">https://imgur.com/CHKEsJo</a></p>
  
  <p>here's my hello.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="ISO-8859-1"&gt;
      &lt;title&gt;Hello World&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
       &lt;h2&gt;done!!!&lt;/h2&gt;
       &lt;h2&gt;${message}&lt;/h2&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My server.xml on Tomcat version 9.0.8 is remained as it is. I haven't changed anything. Only thing I have changed the HTTP/1.1 port,AJP/1.3 port and Tomcat admin Port.</p>
  
  <p>What's wrong with here and what's the reason for this? I can't find out why. Can anyone point my mistake here?</p>