Spring MVC App index.jsp not showing in browser, HTTP 404 result
<p>I've been following a (slightly outdated) tutorial on creating a Spring MVC app here:</p>

<p><a href="https://docs.spring.io/docs/Spring-MVC-step-by-step/part1.html" rel="nofollow">https://docs.spring.io/docs/Spring-MVC-step-by-step/part1.html</a></p>

<p>I've created the build.xml, build.properties, and war/index.jsp files according to the tutorial. Also created a war/WEB-INF directory containing web.xml. I have seen that a common error is directory structure and I've checked to see sure mine is correct. Also made sure paths are correct. </p>

<p>My build file compiles, builds, and deploys correctly with Ant. I am not understanding why the the command "> ant list" results in a "stopped" status instead of "running", however. See execution below.</p>

<p>Is there something I am missing for the index.jsp resource to be found by my browser? I am not sure what else to do at this point.</p>

<p>Are there other good MVC tutorials with Spring? This seemed the most in-depth.</p>

<pre><code>Tom:springapp tom$ ant 
Buildfile: /Users/tom/Projects/springapp/build.xml

usage:
     [echo] 
     [echo] springapp build file
     [echo] -----------------------------------
     [echo] 
     [echo] Available targets are:
     [echo] 
     [echo] build     --&gt; Build the application
     [echo] deploy    --&gt; Deploy application as directory
     [echo] deploywar --&gt; Deploy application as a WAR file
     [echo] install   --&gt; Install application in Tomcat
     [echo] reload    --&gt; Reload application in Tomcat
     [echo] start     --&gt; Start Tomcat application
     [echo] stop      --&gt; Stop Tomcat application
     [echo] list      --&gt; List Tomcat application
     [echo] 

BUILD SUCCESSFUL
Total time: 0 seconds
Tom:springapp tom$ ant build
Buildfile: /Users/tom/Projects/springapp/build.xml

build:

BUILD SUCCESSFUL
Total time: 0 seconds
Tom:springapp tom$ ant deploy
Buildfile: /Users/tom/Projects/springapp/build.xml

build:

deploy:

BUILD SUCCESSFUL
Total time: 0 seconds
Tom:springapp tom$ ant list
Buildfile: /Users/tom/Projects/springapp/build.xml

list:
 [list] OK - Listed applications for virtual host localhost
 [list] /:running:0:ROOT
 [list] /examples:running:0:examples
 [list] /host-manager:running:0:host-manager
 [list] /springapp:stopped:0:springapp
 [list] /manager:running:0:manager
 [list] /docs:running:0:docs

BUILD SUCCESSFUL
Total time: 0 seconds
</code></pre>

<p>If I try to reach my app through my browser:</p>

<p><a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> -> gets the Tomcat landing page</p>

<p>"___________________"/manager/html -> works OK w/login</p>

<p>"___________________"/springapp/index.jsp -> results in HTTP 404</p>

<p>Not sure what else to do. I've checked for typos in all files. Adjusted for newer versions of Tomcat and Java. Source files are below. </p>

<p>build.xml:</p>

<pre><code>&lt;?xml version="1.0"?&gt;

&lt;project name="springapp" basedir="/Users/tom/Projects/springapp"    default="usage"&gt;
&lt;property file="build.properties"/&gt;

&lt;property name="src.dir" value="src"/&gt;
&lt;property name="web.dir" value="war"/&gt;
&lt;property name="build.dir" value="${web.dir}/WEB-INF/classes"/&gt;
&lt;property name="name" value="springapp"/&gt;

&lt;path id="master-classpath"&gt;
    &lt;fileset dir="${web.dir}/WEB-INF/lib"&gt;
        &lt;include name="*.jar"/&gt;
    &lt;/fileset&gt;
    &lt;fileset dir="${appserver.lib}"&gt;
        &lt;include name="servlet-api.jar"/&gt;
    &lt;/fileset&gt;
    &lt;pathelement path="{$build.dir}"/&gt;
&lt;/path&gt;

&lt;target name="usage"&gt;
    &lt;echo message=""/&gt;
    &lt;echo message="${name} build file"/&gt;
    &lt;echo message="-----------------------------------"/&gt;
    &lt;echo message=""/&gt;
    &lt;echo message="Available targets are:"/&gt;
    &lt;echo message=""/&gt;
    &lt;echo message="build     --&gt; Build the application"/&gt;
    &lt;echo message="deploy    --&gt; Deploy application as directory"/&gt;
    &lt;echo message="deploywar --&gt; Deploy application as a WAR file"/&gt;
    &lt;echo message="install   --&gt; Install application in Tomcat"/&gt;
    &lt;echo message="reload    --&gt; Reload application in Tomcat"/&gt;
    &lt;echo message="start     --&gt; Start Tomcat application"/&gt;
    &lt;echo message="stop      --&gt; Stop Tomcat application"/&gt;
    &lt;echo message="list      --&gt; List Tomcat application"/&gt;
    &lt;echo message=""/&gt;
&lt;/target&gt;

&lt;target name="build" description="Compile main source tree java files"&gt;
    &lt;mkdir dir="S{build.dir}"/&gt;
    &lt;javac destdir="${build.dir}" source="1.8.0_60" target="1.8.0_60" debug="true"
        deprecation="false" optimize="false" failonerror="true" includeantruntime="true"&gt;
        &lt;src path="${src.dir}"/&gt;
        &lt;classpath refid="master-classpath"/&gt;
    &lt;/javac&gt;
&lt;/target&gt;

&lt;target name="deploy" depends="build" description="Deploy application"&gt;
    &lt;copy todir="${deploy.path}/${name}" preservelastmodified="true"&gt;
        &lt;fileset dir="${web.dir}"&gt;
            &lt;include name="**/*.*"/&gt;
        &lt;/fileset&gt;
&lt;/copy&gt;
&lt;/target&gt;

&lt;target name="deploywar" depends="build" description="Deploy application as a WAR file"&gt;
    &lt;war destfile="${name}.war"
        webxml="${web.dir}/WEB-INF/web.xmL"&gt;
        &lt;fileset dir="${web.dir}"&gt;
            &lt;include name="**/*.*"/&gt;
        &lt;/fileset&gt;
    &lt;/war&gt;
    &lt;copy todir="${deploy.path}" presevelastmodified="true"&gt;
        &lt;fileset dir="."&gt;
            &lt;include name="*.war"/&gt;
        &lt;/fileset&gt;
    &lt;/copy&gt;
&lt;/target&gt;

&lt;!-- Tomcat tasks --&gt;

&lt;path id="catalina-ant-classpath"&gt;
     &lt;fileset dir="/usr/local/Cellar/tomcat/8.5.3/libexec/lib"&gt;
       &lt;include name="catalina-ant.jar"/&gt;
       &lt;include name="tomcat-coyote.jar"/&gt;
       &lt;include name="tomcat-util.jar"/&gt;
    &lt;/fileset&gt;
    &lt;fileset dir="/usr/local/Cellar/tomcat/8.5.3/libexec/bin"&gt;
        &lt;include name="tomcat-juli.jar"/&gt;
    &lt;/fileset&gt;
&lt;/path&gt;

&lt;taskdef name="install" classname="org.apache.catalina.ant.DeployTask"&gt;
    &lt;classpath refid="catalina-ant-classpath"/&gt;
&lt;/taskdef&gt;
&lt;taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"&gt;
    &lt;classpath refid="catalina-ant-classpath"/&gt;
&lt;/taskdef&gt;
&lt;taskdef name="list" classname="org.apache.catalina.ant.ListTask"&gt;
    &lt;classpath refid="catalina-ant-classpath"/&gt;
&lt;/taskdef&gt;
&lt;taskdef name="start" classname="org.apache.catalina.ant.StartTask"&gt;
    &lt;classpath refid="catalina-ant-classpath"/&gt;
&lt;/taskdef&gt;
&lt;taskdef name="stop" classname="org.apache.catalina.ant.StopTask"&gt;
    &lt;classpath refid="catalina-ant-classpath"/&gt;
&lt;/taskdef&gt;

&lt;target name="install" description="Install application in Tomcat"&gt;
    &lt;install url="${tomcat.manager.url}"
        username="${tomcat.manager.username}"
        password="${tomcat.manager.password}"
        path="/${name}"/&gt;
&lt;/target&gt;

&lt;target name="reload" description="Reload application in Tomcat"&gt;
    &lt;install url="${tomcat.manager.url}"
        username="${tomcat.manager.username}"
        password="${tomcat.manager.password}"
        path="/${name}"/&gt;
&lt;/target&gt;

&lt;target name="start" description="Start application in Tomcat"&gt;
    &lt;install url="${tomcat.manager.url}"
        username="${tomcat.manager.username}"
        password="${tomcat.manager.password}"
        path="/${name}"/&gt;
&lt;/target&gt;

&lt;target name="stop" description="Stop application in Tomcat"&gt;
    &lt;install url="${tomcat.manager.url}"
        username="${tomcat.manager.username}"
        password="${tomcat.manager.password}"
        path="/${name}"/&gt;
&lt;/target&gt;

&lt;target name="list" description="List application in Tomcat"&gt;
    &lt;list url="${tomcat.manager.url}"
        username="${tomcat.manager.username}"
        password="${tomcat.manager.password}"/&gt;
&lt;/target&gt;

&lt;!-- End Tomcat tasks --&gt;
</code></pre>

<p></p>

<p>springapp/build.properties:</p>

<pre><code>#Ant properties for building the springapp

appserver.home=/usr/local/Cellar/tomcat/8.5.3/libexec

appserver.lib=${appserver.home}/lib

deploy.path=${appserver.home}/webapps

tomcat.manager.url=http://localhost:8080/manager/text
tomcat.manager.username=tomcat
tomcat.manager.password=s3cret
</code></pre>

<p>springapp/war/index.jsp </p>

<pre><code>&lt;html&gt;
    &lt;head&gt;&lt;title&gt;Example :: Spring Application&lt;/title&gt;&lt;/head&gt;
    &lt;body&gt;
        &lt;h1&gt;Example - Spring Application&lt;/h1&gt;
        &lt;p&gt;This is my test.&lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>springapp/war/WEB-INF/web.xml </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app version="2.4"
xmlns="httpL//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;welcome-file-list&gt;
  &lt;welcome-file&gt;
    index.jsp
  &lt;/welcome-file&gt;
&lt;/welcome-file-list&gt;

&lt;/web-app&gt;"
</code></pre>