我想从一个servlet重定向JSP页面。所有JSP页面都在下Web Content。不under Web- INF。我在调用该JSP页面时遇到问题。我收到404错误。路径问题。
Web Content
under Web- INF
如何在Web Content下调用jsp页面?
ServletContext context = getServletContext(); RequestDispatcher dispatcher = context.getRequestDispatcher("/thankYou.jsp"); dispatcher.forward(request,response);
谢谢你
问题解决了 !
我这样解决问题RequestDispatcher:
RequestDispatcher
RequestDispatcher requestDispatcher; requestDispatcher = request.getRequestDispatcher("/thankYou.jsp"); requestDispatcher.forward(request, response);