Pass variables from servlet to jsp
It will fail to work when: You are redirecting the response to a new request by response.sendRedirect(“page.jsp”). The newly created request object will of course not contain the attributes anymore and they will not be accessible in the redirected JSP. You need to forward rather than redirect. E.g. request.setAttribute(“name”, “value”); request.getRequestDispatcher(“page.jsp”).forward(request, response); You are accessing … Read more