javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1

Spring JIRA | Kenny MacLeod | 9 years ago
  1. 0

    A fairly common exception in our server logs is where we receive a HEAD request which passes through the application as far as InternalResourceView, which then attempts a RequestDispatcher.forward(). At this point Tomcat will throw the following exception: javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1 at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:1018) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:329) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:240) This happens because the HttpServlet implementation of doHead() is simply to wrap the original HttpServletResponse in a dummy object. Our current approach to this is to have a custom subclass of InternalResourceView which simply does nothing on renderMergedOutputModel() if the request is a HEAD request, but this isn't very nice. None of this is Spring's fault, of course, but I'm wondering if InternalResourceView could be configured somehow to handle this more elegantly.

    Spring JIRA | 9 years ago | Kenny MacLeod
    javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  2. 0

    [SPR-4771] [InternalResourceView] Handle SRV.8.2 and SRV.14.2.5.1 violations more elegantly - Spring JIRA

    spring.io | 7 months ago
    javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  3. 0

    A fairly common exception in our server logs is where we receive a HEAD request which passes through the application as far as InternalResourceView, which then attempts a RequestDispatcher.forward(). At this point Tomcat will throw the following exception: javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1 at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:1018) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:329) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:240) This happens because the HttpServlet implementation of doHead() is simply to wrap the original HttpServletResponse in a dummy object. Our current approach to this is to have a custom subclass of InternalResourceView which simply does nothing on renderMergedOutputModel() if the request is a HEAD request, but this isn't very nice. None of this is Spring's fault, of course, but I'm wondering if InternalResourceView could be configured somehow to handle this more elegantly.

    Spring JIRA | 9 years ago | Kenny MacLeod
    javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [Tomcat-users] HEAD request to a Servlet - Grokbase

    grokbase.com | 7 months ago
    javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  6. 0

    jboss 4.2.0.GA servlet forward throw exception | JBoss Developer

    jboss.org | 7 months ago
    javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1

    6 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.servlet.ServletException

      Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1

      at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects()
    2. Glassfish Core
      ApplicationDispatcher.forward
      1. org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:1018)
      2. org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:329)
      3. org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      3 frames
    3. Spring MVC
      InternalResourceView.renderMergedOutputModel
      1. org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:240)
      1 frame