RequestDispatcher from ServletRequest vs ServletContext

We have seen two programs with include() and forward() methods of RequestDispatcher. In both the programs, getRequestDispatcher(String path) of ServletRequest is used to obtain an object of RequestDispatcher. Infact, RequestDispatcher object can be obtained in another way also – using javax.servlet.ServletContext. The same getRequestDispatcher(String path) method exist in ServletContext also. That is, the same method …

RequestDispatcher from ServletRequest vs ServletContext Read More »