title: Simple spring framework program not running and I cannot figure out why
body: <p>I have already had help with this program and got it to work. I then decided I would do it again my scratch to make sure I understood but I got the same issues. The hard part is the console is not printing out any errors.</p>
  
  <p>console:</p>
  
  <pre><code>Mar 22, 2015 9:07:09 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:LearnSpringMVC' did not find a matching property.
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Server version:        Apache Tomcat/8.0.17
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Server built:          Jan 9 2015 15:58:59 UTC
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Server number:         8.0.17.0
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: OS Name:               Mac OS X
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: OS Version:            10.10.2
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Architecture:          x86_64
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: JAVA_HOME:             /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: JVM Version:           1.8.0_31-b13
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: JVM Vendor:            Oracle Corporation
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: CATALINA_BASE:         /apache-tomcat-8.0.17
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: CATALINA_HOME:         /apache-tomcat-8.0.17
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Dcatalina.base=/apache-tomcat-8.0.17
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Dcatalina.home=/apache-tomcat-8.0.17
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Dwtp.deploy=/apache-tomcat-8.0.17/wtpwebapps
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Djava.endorsed.dirs=/apache-tomcat-8.0.17/endorsed
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Dfile.encoding=UTF-8
  Mar 22, 2015 9:07:09 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/DrewJocham/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
  Mar 22, 2015 9:07:09 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-nio-8080"]
  Mar 22, 2015 9:07:09 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
  INFO: Using a shared selector for servlet write/read
  Mar 22, 2015 9:07:09 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
  Mar 22, 2015 9:07:09 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
  INFO: Using a shared selector for servlet write/read
  Mar 22, 2015 9:07:09 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 1890 ms
  Mar 22, 2015 9:07:09 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Mar 22, 2015 9:07:09 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/8.0.17
  Mar 22, 2015 9:07:11 PM org.apache.catalina.core.ApplicationContext log
  INFO: No Spring WebApplicationInitializer types detected on classpath
  Mar 22, 2015 9:07:12 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
  INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [216] milliseconds.
  Mar 22, 2015 9:07:12 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /apache-tomcat-8.0.17/webapps/docs
  Mar 22, 2015 9:07:12 PM org.apache.jasper.servlet.TldScanner scanJars
  INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  Mar 22, 2015 9:07:12 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory /apache-tomcat-8.0.17/webapps/docs has finished in 194 ms
  Mar 22, 2015 9:07:12 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /apache-tomcat-8.0.17/webapps/examples
  Mar 22, 2015 9:07:13 PM org.apache.catalina.core.ApplicationContext log
  INFO: ContextListener: contextInitialized()
  Mar 22, 2015 9:07:13 PM org.apache.catalina.core.ApplicationContext log
  INFO: SessionListener: contextInitialized()
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory /apache-tomcat-8.0.17/webapps/examples has finished in 750 ms
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /apache-tomcat-8.0.17/webapps/host-manager
  Mar 22, 2015 9:07:13 PM org.apache.jasper.servlet.TldScanner scanJars
  INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory /apache-tomcat-8.0.17/webapps/host-manager has finished in 164 ms
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /apache-tomcat-8.0.17/webapps/manager
  Mar 22, 2015 9:07:13 PM org.apache.jasper.servlet.TldScanner scanJars
  INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory /apache-tomcat-8.0.17/webapps/manager has finished in 172 ms
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /apache-tomcat-8.0.17/webapps/ROOT
  Mar 22, 2015 9:07:13 PM org.apache.jasper.servlet.TldScanner scanJars
  INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory /apache-tomcat-8.0.17/webapps/ROOT has finished in 147 ms
  Mar 22, 2015 9:07:13 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-nio-8080"]
  Mar 22, 2015 9:07:13 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-nio-8009"]
  Mar 22, 2015 9:07:13 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 4068 ms
  </code></pre>
  
  <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://xmlns.jcp.org/xml/ns/javaee"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
      id="WebApp_ID"
      version="3.1"&gt;
      &lt;display-name&gt;SpringJSP&lt;/display-name&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:offers-servlet.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;offers&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;offers&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>home.jsp file</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8"
      pageEncoding="UTF-8"%&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=UTF-8"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  Hello from JSP...
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>OffersController.java</p>
  
  <pre><code>package com.learnspring.controller;
  
  import javax.servlet.http.HttpServletRequest;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.servlet.ModelAndView;
  
  @Controller
  @RequestMapping(value = "/")
  public class OffersController {
      @RequestMapping(method = RequestMethod.GET)
      public ModelAndView homeGet(HttpServletRequest request) {
          System.out.println("Check mapping");
          ModelAndView model = new ModelAndView("home");
          return model;
      }
  }
  </code></pre>
  
  <p>offers-servlet.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"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.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-4.1.xsd"&gt;
      &lt;context:component-scan base-package="com.learnspring.controller"&gt;&lt;/context:component-scan&gt;
      &lt;mvc:annotation-driven&gt;&lt;/mvc:annotation-driven&gt;
      &lt;mvc:default-servlet-handler /&gt;
      &lt;bean
          id="jspViewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property
              name="prefix"
              value="/WEB-INF/jsps/"&gt;&lt;/property&gt;
          &lt;property
              name="suffix"
              value=".jsp"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>I do not know why this keeps happening to me. Can anyone help out? I checked the working code line by line and it was correct and it still works.</p>