您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Spring-Test-MVC / MockServletContext-内容在测试中为空,但在Tomcat上运行

Spring-Test-MVC / MockServletContext-内容在测试中为空,但在Tomcat上运行

添加到您的edit3中,本质上是为了JSP渲染,最后一次调用

RequestDispatcher requestDispatcher = httpRequest.getRequestDispacher(jspPath)
requestDispatcher.forward(httpRequest,httpResponse)

并且RequestDispatcher实现是由容器提供的(因为它取决于需要如何编译jsp,在何处放置已编译的jsp等)。RequestDispatcher的Mock实现只是捕获转发的JSP页面,并且您

Jave 2022/1/1 18:28:44 有304人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶