What is the difference between callling a RequestDispatcher
using ServletRequest and ServletContext?
Answers were Sorted based on User's Feedback
Answer / mahesh
We can give relative URL when we use ServletRequest and not
while using ServletContext.
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / prachetash
RequestDispatcher rd = request.getRequestDispatcher("result.jsp")
This is relative path, becoz there is no "/" slash.Container looks in same logical path.
RequestDispatcher rd = getServletContext.getRequestDispatcher("/result.jsp")
Is This Answer Correct ? | 0 Yes | 0 No |
What happens, when client requests for server object, which is not yet loaded into the memory?
How will you open a new page after certain interval of time (5 sec), on clicking of a button in an html page?
Name the different ways of session tracking.
How printwriter is different from servletoutputstream?
What is servlet configuration?
can i call init() method in destroy() method of servlset. ?
Which exception is thrown if servlet is not initialized properly?
How can we upload the file to the server using servlet?
When jsessionid is created?
What are the methods in HttpSession and their use?
What is filter? Can filter be used as request or response?
How to get the actual path of servlet in server?