Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9433

Unable to render view returned as Callable<String> by async servlet when running in Jetty 8


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.2 M1
    • Fix Version/s: 3.2 M2
    • Component/s: Web
    • Security Level: Public
    • Labels:
    • Last commented by a User:


      When running the spring-mvc-async branch of the spring-mvc-showcase project in Jetty 8, the async servlet render view demo throws an exception and fails to render the view correctly.

      21:25:52 [qtp4697408-18] DispatcherServlet - DispatcherServlet with name 'appServlet' processing GET request for [/spring-mvc-showcase/views/html]
      21:25:52 [qtp4697408-18] RequestMappingHandlerMapping - Looking up handler method for path /views/html
      21:25:52 [qtp4697408-18] RequestMappingHandlerMapping - Returning handler method [public java.util.concurrent.Callable<java.lang.String> org.springframework.samples.mvc.views.ViewsController.prepare(org.springframework.ui.Model)]
      21:25:52 [qtp4697408-18] DispatcherServlet - Last-Modified value for [/spring-mvc-showcase/views/html] is: -1
      21:25:52 [qtp4697408-18] DispatcherServlet - Exiting request thread and leaving the response open
      21:25:52 [SimpleAsyncTaskExecutor-1] DispatcherServlet - Resuming asynchronous processing of GET request for [/spring-mvc-showcase/views/html]
      21:25:55 [SimpleAsyncTaskExecutor-1] DispatcherServlet - Rendering view [org.springframework.web.servlet.view.JstlView: name 'views/html'; URL [/WEB-INF/views/views/html.jsp]] in DispatcherServlet with name 'appServlet'
      21:25:55 [SimpleAsyncTaskExecutor-1] JstlView - Added model object 'fruit' of type [java.lang.String] to request in view with name 'views/html'
      21:25:55 [SimpleAsyncTaskExecutor-1] JstlView - Added model object 'foo' of type [java.lang.String] to request in view with name 'views/html'
      21:25:55 [SimpleAsyncTaskExecutor-1] DispatcherServlet - Could not complete request
      javax.servlet.ServletException: Could not get RequestDispatcher for [/WEB-INF/views/views/html.jsp]: Check that the corresponding file exists within your web application archive!
      	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:219)
      	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
      	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1265)
      	at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1016)
      	at org.springframework.web.servlet.DispatcherServlet.access$300(DispatcherServlet.java:141)
      	at org.springframework.web.servlet.DispatcherServlet$2.call(DispatcherServlet.java:1054)
      	at org.springframework.web.servlet.DispatcherServlet$1.call(DispatcherServlet.java:884)
      	at org.springframework.web.servlet.FrameworkServlet$1.call(FrameworkServlet.java:991)
      	at org.springframework.web.context.request.async.AsyncExecutionChainRunnable.run(AsyncExecutionChainRunnable.java:64)
      	at java.lang.Thread.run(Thread.java:722)
      21:25:55 [SimpleAsyncTaskExecutor-1] AsyncExecutionChainRunnable - Completing async request processing

      To reproduce:

      1. Checkout the spring-mvc-async branch from https://github.com/SpringSource/spring-mvc-showcase/tree/spring-mvc-async
      2. Run the web app using Jetty 8 (I'm running the latest stable build, jetty-distribution-8.1.3.v20120416)
      3. Go to http://localhost:8080/spring-mvc-showcase/#views
      4. Click on the "HTML generated by JSP template" link
      5. The above exception occurs

      The same web app works fine in Glassfish v3.




            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              kwong.lai Kwong Lai
              Last updater:
              Rossen Stoyanchev
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created:
                Days since last comment:
                5 years, 41 weeks, 5 days ago