Difference between ServletRequest.getRequestDispatcher and ServletContext.getRequestDispatcher
May 6th, 2008- request.getRequestDispatcher(“url”) means the dispatch is relative to the current HTTP request.
Example code:RequestDispatcher reqDispObj = request.getRequestDispatcher("/home.jsp"); - getServletContext().getRequestDispatcher(“url”) means the dispatch is relative to the root of the ServletContext.
Example code:RequestDispatcher reqDispObj = getServletContext().getRequestDispatcher("/ContextRoot/home.jsp");


