title: spring boot 1.4 jsp page not evaluated Forward InternalViewResolver
body: <p>After 2 days of investigation, and looking a lot of answers about my issue, I cannot solve it.
  I am not expert of spring framework.</p>
  
  <p>Entry point : 
  I have generate a jhipster project a year ago. I want to embed jsp pages in my project.</p>
  
  <p>I'm using spring boot 1.4 in a maven project
  I have include dependency following : </p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I have created a new servlet in WebConfigurer class which implements ServletContextInitializer.onStartup and created a file named servletJsp-servlet.xml in a WEB-INF resources folder.
  The xml instanciate InternalViewResolver with prefix /mesPages/ and suffix=.jsp</p>
  
  <p>I created also a controller : </p>
  
  <pre><code>@Controller
  public class TestJspController {
      @RequestMapping(value = "/jsp/bbb")
      public ModelAndView serveLog4jAdmin() {
          return new ModelAndView("log4jAdmin");
      }
  }
  </code></pre>
  
  <p>I stick here : (see log below)</p>
  
  <p>The logs say that :  </p>
  
  <ul>
  <li>Controller is well called</li>
  <li>It returns well the ModelAndView</li>
  <li>Launch Forward to resource [/mesPagesJsps/log4jAdmin.jsp] from InternalResourceView 'log4jAdmin'</li>
  </ul>
  
  <p>But after that, instead of getting it and rendering it, no stacktrace and try to resolve jsp page with another servlet : dispatcherServlet (I believe this is the defaut spring autoconfigured and created) spring servlet.
  The dispatcherServlet is successfull in getting it because I have put my folder mesPages (which contains my jsps) every where in the project (META-INF, WEB-INF, root folders) of resources and webapp</p>
  
  <p>Finally, the jsp page is not evaluated, and broswer give me to download it as "application/octet-stream".
  Previously before putting jsp on all these folders, I uses to have the same controller behaviour but ending with 404 error (blank page).</p>
  
  <p>I really don't understand why app behave like this.
  I have another spring (not boot) webapp which works well.
  I tried to debug, but to complex for me ... When debugging I was just detect that the requestDispatcher cannot dispatch Forward because there is no Handler with type FORWARD in some 'next' variables.
  I think this is the cause ...</p>
  
  <p>If someone has some anwser, I would be very happy <br>
  I can give any other information that is required.</p>
  
  <p>The concerned part of log : </p>
  
  <pre><code>[  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'servletJSP' processing GET request for [/jsps/jsp/bbb]
  [  XNIO-3 task-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /jsp/bbb
  [  XNIO-3 task-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public org.springframework.web.servlet.ModelAndView fr.softeam.testify.web.rest.jsp.TestJspController.serveLog4jAdmin()]
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/jsps/jsp/bbb] is: -1
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : Rendering view [org.springframework.web.servlet.view.JstlView: name 'log4jAdmin'; URL [/mesPagesJsps/log4jAdmin.jsp]] in DispatcherServlet with name 'servletJSP'
  [  XNIO-3 task-2] o.s.web.servlet.view.JstlView            : Forwarding to resource [/mesPagesJsps/log4jAdmin.jsp] in InternalResourceView 'log4jAdmin'
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/mesPagesJsps/log4jAdmin.jsp]
  [  XNIO-3 task-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /mesPagesJsps/log4jAdmin.jsp
  [  XNIO-3 task-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Did not find handler method for [/mesPagesJsps/log4jAdmin.jsp]
  [  XNIO-3 task-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : Matching patterns for request [/mesPagesJsps/log4jAdmin.jsp] are [/**]
  [  XNIO-3 task-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : URI Template variables for request [/mesPagesJsps/log4jAdmin.jsp] are {}
  [  XNIO-3 task-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapping [/mesPagesJsps/log4jAdmin.jsp] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@1774cad]]] and 1 interceptor
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/mesPagesJsps/log4jAdmin.jsp] is: -1
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : Successfully completed request
  [  XNIO-3 task-2] o.s.web.servlet.DispatcherServlet        : Successfully completed request
  </code></pre>