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 is java servlet session?
What’s the difference between forward() and sendredirect() methods?
Explain servlet.
What do you mean by cgi and what are its drawbacks?
Can we override destroy method in servlet?
Which method of the httpservletrequest object is used?
What is the use of servletconfig interface?
Which java framework is most popular?
How is a servlet implemented in code?
What is the procedure for initializing a servlet?
Is servlet a server side scripting language?
What is servlet mapping?
Write a simple servlet program to print the contents of html.
What is setattribute in servlet?
Tell the new features added in servletrequest interface i.e. Servlet 2.4