在我的应用程序中,我已经将我的KARAF版本从4.2.15更新到4.4.1,Java从8更新到11。
浏览了官方发布说明,并更新了一些依赖项。
将OSGI-Core从6.0.0升级到8.0.0。
将osgi.compendium 5.0.0升级为osgi.cmpn 7.0.0
将Jetty从9.4.43.v20210629升级到9.4.46.v20220331。
将pax-web从4.3.4升级到7.2.11。
我在我的应用程序中使用javax.servlet-api 3.1.0版本。
我无法创建默认的RequestDispatcher。请检查下面的代码行。
getServletContext().getNamedDispatcher("default");公共类ExampleServlet扩展了HttpServlet {受保护的空洞doGet(HttpServletRequest request,HttpServletResponse response)抛出ServletException,IOException { RequestDispatcher requestDispatcher =ExampleServlet // get getServletContext()正在调用GenericServlet中的方法。RequestDispatcher.include(请求,响应);}
在版本升级之前,上面的代码过去工作得很好,但是现在我将requestDispatcher作为空。
有人能看看吗,如果我遗漏了什么,请告诉我。
在版本升级之前,上面的代码过去工作得很好,但是现在我将requestDispatcher作为空。
发布于 2022-11-15 13:01:12
这是最后答案的占位符。目前,我们正在分析这个问题:https://github.com/ops4j/org.ops4j.pax.web/issues/1794
https://stackoverflow.com/questions/74432966
复制相似问题