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 are the jobs performed by servlets?
Difference between GET and POST?
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
Why servlet is used as controller ? Not JSP? I want complete explation?
Explain the difference between generic servlet and http servlet?
What are the phases of the servlet life cycle?
Why filter is used in servlet?
What is the servlet?
Can you send the mail from a servlet ,if yes tell how?
How do we share data using 'getservletcontext ()?
What are cookies and how will you use them?
Life Cycle of servlets?