There are different ways of creating a RequestDispatcher Object:
Method 1: Using HttpRequest Object
RequestDispatcher rd=request.getRequestDispatcher();
Method 2: Using ServletContext Object
RequestDispatcher rd=getServletContext().getRequestDispatcher();
Method 3: Using ServletContext & ServletConfig Object
RequestDispatcher rd =getServletConfig().getServletContext().getRequestDispatcher();
What are the differences between these 3 methods and which one should i prefer to call a JSP page from a servlet/JSP in a dynamic web-app?