How can you maintain servlet chaining?



How can you maintain servlet chaining?..

Answer / 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

More Servlets Interview Questions

How many objects of a servlet is created?

0 Answers  


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

0 Answers   CTS,


What is httpservlet and how it is different from genericservlet?

0 Answers  


Explain the difference between a web server and a web container?

0 Answers  


Explain servlet events?

0 Answers  






How can a servlet refresh automatically if some new data has entered the database?

3 Answers   Citi Bank, CitiGroup, IBM, Satyam,


What is the difference between context parameter and context attribute?

0 Answers  


How to pass JavaBeans data to JSP using Servlets?

2 Answers  


What are different ways for servlet authentication?

0 Answers  


What is api in servlet?

0 Answers  


What do you mean by annotations in servlet?

0 Answers  


what is the advantage of using Servlets over CGI programming?

4 Answers  


Categories