title: DispatcherServlet doesn't appear to be processing the ModelAndView response
body: <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_3_0.xsd" 
  id="WebApp_ID" 
  version="3.0"&gt;
    &lt;display-name&gt;audiClave&lt;/display-name&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;webAppRootKey&lt;/param-name&gt;
      &lt;param-value&gt;rest.root&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;!-- Processes application requests --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;rest&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;rest&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/REST/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;base&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;      
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;base&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p></p>
  
  <p>base-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:mvc="http://www.springframework.org/schema/mvc"
  xmlns:context="http://www.springframework.org/schema/context"
  xsi:schemaLocation="
      http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
      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;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;
  
  &lt;!-- Scans within the base package of the application for @Components to configure as beans --&gt;
  &lt;!-- @Controller, @Service, @Configuration, etc. --&gt;
  &lt;context:component-scan base-package="com.audiClave.controllers" /&gt;
  
  &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
  &lt;mvc:annotation-driven /&gt;
  
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/views/"/&gt;
      &lt;property name="suffix" value=".jsp"/&gt;
  &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Here is the BaseController:</p>
  
  <pre><code>package com.audiClave.controllers;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.servlet.ModelAndView;
  
  @Controller
  public class BaseController {
  
  @RequestMapping(value = "/index.html")
  public ModelAndView home() {
      System.out.println("BaseController: Passing through...");
      return new ModelAndView("home");
      // return "WEB-INF/views/home.jsp";
  }
  }
  </code></pre>
  
  <p>I call the tomcat service with:</p>
  
  <pre><code>http://localhost:8080/audiClave/index.html
  </code></pre>
  
  <p>and this is from the console:</p>
  
  <pre><code>BaseController: Passing through...
  </code></pre>
  
  <p>appears in the console window but nothing else. Content returned states:</p>
  
  <pre><code>description The requested resource () is not available.
  </code></pre>
  
  <p>Contents of /WEB-INF/views/home.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;title&gt;Audiclave&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Hello world from audiClave!&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The problem isn't in the file though because if I return </p>
  
  <pre><code>return new ModelAndView("xxxx");
  </code></pre>
  
  <p>It is the same result. </p>
  
  <p>It does seem to be library related as it was working before I started changing the libraries (relating to JSTL and JSP) in my project. I don't know the sequence of the libraries I have changed. I must have ended up with something incompatible with tomcat 7.</p>
  
  <p>There is nothing in the tomcat log that indicates a problem. This is the startup log:</p>
  
  <pre><code>01/06/2011 9:25:20 AM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Python26\Scripts;C:\Python26\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Java\jdk1.6.0_21\bin;%APPDATA%\Python\Scripts;C:\Program Files\Translate Toolkit;C:\Program Files\Gallio\bin
  01/06/2011 9:25:20 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:audiClave' did not find a matching property.
  01/06/2011 9:25:20 AM org.apache.coyote.AbstractProtocolHandler init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  01/06/2011 9:25:20 AM org.apache.coyote.AbstractProtocolHandler init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  01/06/2011 9:25:20 AM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 336 ms
  01/06/2011 9:25:20 AM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  01/06/2011 9:25:20 AM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
  01/06/2011 9:25:22 AM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'rest'
  01/06/2011 9:25:22 AM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'rest': initialization started
  01/06/2011 9:25:22 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'rest-servlet': startup date [Wed Jun     01 09:25:22 EST 2011]; root of context hierarchy
  01/06/2011 9:25:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/rest-servlet.xml]
  01/06/2011 9:25:22 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
  INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@62610b: defining beans [baseController,restController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,beanNameResolver,RemedyXml]; root of factory hierarchy
  01/06/2011 9:25:22 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/index.html] onto handler 'baseController'
  01/06/2011 9:25:22 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/REST/remedies/{language}] onto handler 'restController'
  01/06/2011 9:25:22 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/REST/remedies/{language}.*] onto handler 'restController'
  01/06/2011 9:25:22 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/REST/remedies/{language}/] onto handler 'restController'
  01/06/2011 9:25:22 AM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'rest': initialization completed in 359 ms
  01/06/2011 9:25:22 AM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'base'
  01/06/2011 9:25:22 AM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'base': initialization started
  01/06/2011 9:25:22 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'base-servlet': startup date [Wed Jun 01 09:25:22 EST 2011]; root of context hierarchy
  01/06/2011 9:25:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/base-servlet.xml]
  01/06/2011 9:25:22 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
  INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@848ecc: defining beans [baseController,restController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0]; root of factory hierarchy
  01/06/2011 9:25:23 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/index.html] onto handler 'baseController'
  01/06/2011 9:25:23 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/REST/remedies/{language}] onto handler 'restController'
  01/06/2011 9:25:23 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/REST/remedies/{language}.*] onto handler 'restController'
  01/06/2011 9:25:23 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/REST/remedies/{language}/] onto handler 'restController'
  01/06/2011 9:25:23 AM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'base': initialization completed in 297 ms
  SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  SLF4J: Defaulting to no-operation (NOP) logger implementation
  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
  01/06/2011 9:25:23 AM org.apache.coyote.AbstractProtocolHandler start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  01/06/2011 9:25:23 AM org.apache.coyote.AbstractProtocolHandler start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  01/06/2011 9:25:23 AM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 2490 ms
  </code></pre>
  
  <p>As per Biju's recommendation here is the log from after baseController returns the modelAndView:</p>
  
  <pre><code>2011-06-01 11:32:59,218 ["http-bio-8080"-exec-11] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Invoking afterPropertiesSet() on bean with name 'home'
  2011-06-01 11:32:59,218 ["http-bio-8080"-exec-11] DEBUG org.springframework.web.servlet.DispatcherServlet - Rendering view [org.springframework.web.servlet.view.JstlView: name 'home'; URL [/WEB-INF/views/home.jsp]] in DispatcherServlet with name 'base'
  2011-06-01 11:32:59,218 ["http-bio-8080"-exec-11] DEBUG org.springframework.web.servlet.view.JstlView - Forwarding to resource [/WEB-INF/views/home.jsp] in InternalResourceView 'home'
  2011-06-01 11:32:59,218 ["http-bio-8080"-exec-11] DEBUG org.springframework.web.servlet.DispatcherServlet - Successfully completed request
  </code></pre>