Hi, I am having trouble understanding the differences between the getRequestDispatcher methods available in the ServletRequest class and the Servletcontext class. Please describe the exact difference as i feel even the API documentation is not clear enough on this. Thanks in advance. Santosh
no more user
posted 14 years ago
the API tell that:
The difference between ServletRequest.getRequestDispatcher() and ServletContext.getRequestDispatcher() is that the first can take a relative path.
so, here request.getRequestDispatcher("./html/file.html"); and here context.getRequestDispatcher("/html/file.html"); is valid code, but its not: context.getRequestDispatcher("./html/file.html"); ------------------ regards, alex
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads