Closed jianshaow closed 4 years ago
If use ServletHandler as servlet handler, like below
ServletHandler servletHandler = new ServletHandler(); servletHandler.addServletWithMapping(TestServlet.class, "/hello"); jettyServer = new Server(0); jettyServer.setHandler(servletHandler);
httpServletRequest.getContextPath() wil return null, add a null judgment can fix it
If use ServletHandler as servlet handler, like below
httpServletRequest.getContextPath() wil return null, add a null judgment can fix it