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 is the difference between Difference between doGet() and doPost()?
Explain jsessionid?
What are the differences between the servletconfig interface and the servletcontext interface?
Can we use threads in Servlets?
What is the capacity the doget can send to the server?
What compiler do not do if we create our own constructor?
what is servlet life cycle?
What is cgi and what are its drawbacks?
What exactly are the functions of servlet?
What is the use of attribute in servlets?
How can the session in servlet can be destroyed?
When Servlet is unloaded?