Answer Posted / bikash khuntia
you can maintain servlet chaining by using:
1. RequestDispatcher
2. include
Step 1: Set the request
request.setAttribute(key,value);
Step 2: Implimanting of RequestDispatcher
RequestDispatcher rsd = getServletContext().
getRequestDispatcher("Servletname");
Step 3: Forward or include the request and response by
rsd.forward(request,response);
rsd.include(request,response);
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What do you mean by deployment descriptor?
Define the servlet mapping.
What is new in ServletRequest interface ? (Servlet 2.4)
What is the use of send redirect () method?
What is servlet? Explain
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
Elucidate servlet attributes and its scope?
What is http servlet?
Write all the phases defined in servlet life cycle?
Explain the lifecycle of a servlet?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
What is servlet name in web xml?
What is the difference between the include() and forward() methods?
Is dispatcher servlet a singleton?
What is pure servlet?