Spring and cross context: WebAsyncManager cannot be cast to WebAsyncManager

前端 未结 4 1106
我在风中等你
我在风中等你 2020-12-18 09:03

I want to use the cross context feature in a Spring application so I can import some webapp1 JSP into a webapp2 JSP. I\'m using Eclipse STS with the included Tomcat 7.0.42 (

4条回答
  •  囚心锁ツ
    2020-12-18 09:10

    Seems like Spring is not ready for cross context request processing (at least not without a bit of hacking).

    FrameworkServlet always tries to get WebAsyncManager from the request attributes. And the way it is extracted can not work across different contexts (class loaders).

    I see two possibilities how to workaround this:

    • Implement your own include JSP tag, which will wrap the original request so that Spring specific attributes are not visible (usually the ones starting with org.springframework) to the second context.
    • Put Spring JARs in a shared class loader path (that would be probably the easier way).

提交回复
热议问题