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 http servlet?
What are the methods in HttpServlet?
Explain servlet events?
What is called servlet container?
How to work with Chinese login page (internationalization).if he enters user name and password in chinese, how is it converted to English and validate in db? And in reverse it should display welcome message in Chinese,if user is valid
When the methods init() and Distroy() will be called?
What do you mean by url pattern in servlet?
What is servlet collaboration?
What is httpservlet and how it is different from genericservlet?
How to create war file?
how do you maintain sessions in servlets?
Is servlet a server side scripting language?