title: 404 - Request resource is not available - Spring MVC 3
body: <p>I'm trying to use Spring framework in my webapplication but I'm having troubles while trying to set it up. I know a lot of people has asked something similiar to my question, but I couldn't have my problem solved with all the hints I've seen. </p>
  
  <p>Please refer below for my code which tries to open an <code>.html</code> file using Spring framework.</p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
      xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"  
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"  
      id="WebApp_ID" version="2.5"&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;fitTrackerServlet&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/config/servlet-config.xml&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;fitTrackerServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
    &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>servlet-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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:p="http://www.springframework.org/schema/p"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"&gt;
  
  &lt;mvc:annotation-driven/&gt;
  &lt;context:component-scan base-package="com.pluralsight.controller"/&gt;
  
  &lt;!--  
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB INF/jsp/"&gt;&lt;/property&gt;
      &lt;property name="suffix" value=".jsp"/&gt;
  &lt;/bean&gt;
  --&gt;
  
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB INF/jsp" p:suffix=".jsp"&gt;
  
  &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>index.jsp</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;h2&gt;Hello World!&lt;/h2&gt;
  &lt;H4&gt;Welcome&lt;/H4&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>hello.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;${greeting}&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>addMinutes.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Add Minutes Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Add Minutes Exercised&lt;/h1&gt;
      &lt;form:form command name="exercise"&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td&gt;Minutes Exercise Today&lt;/td&gt;
                  &lt;td&gt;&lt;form:input path="minutes"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;input type="submit" value="Enter Exercise"/&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/form:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Result:</p>
  
  <p><code>HTTP Status 500 - Servlet.init() for servlet fitTrackerServlet threw exception
  type Exception report</code></p>
  
  <p>message<br>
  <code>Servlet.init() for servlet fitTrackerServlet threw exception</code></p>
  
  <p>description<br>
  <code>The server encountered an internal error that prevented it from fulfilling this request.</code></p>
  
  <p>exception   </p>
  
  <pre><code>javax.servlet.ServletException: Servlet.init() for servlet fitTrackerServlet threw exception
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>I am using Apache Tomcat 7.0.41<br>
  I am using <code>localhost:8080/FitnessTracker/addMinutes.html</code><br>
  I am not able to open html pages.</p>
  
  <p>What could I be missing here?</p>