How to pass a requrest object of one servlet as a request
object to another servlet?

Answers were Sorted based on User's Feedback



How to pass a requrest object of one servlet as a request object to another servlet?..

Answer / janet

use a Request Dispatcher

Is This Answer Correct ?    8 Yes 0 No

How to pass a requrest object of one servlet as a request object to another servlet?..

Answer / hari

Use RequestDispatcher to pass a requrest object of one
servlet as a request object to another servlet.

One way of implementing this operation ,

RequestDispatcher rD = null;
rd = request.getRequestDispatcher("xxx.jsp (or) servlet");
rD.forward(request,response);

Is This Answer Correct ?    8 Yes 0 No

How to pass a requrest object of one servlet as a request object to another servlet?..

Answer / ravikiran(aptech mumbai)

using request.setAttribute("key",value) in the first servlet
and request.getAttribute("key") in the second servlet

Is This Answer Correct ?    5 Yes 3 No

How to pass a requrest object of one servlet as a request object to another servlet?..

Answer / priya

in an any web application when we have to pass object from
one servlet to another then we use request dispatcher.the
request dispatcher is used by using request.setAttribute
("key",value) in the first servlet and request.getAttribute
("key")in the second servlet.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Servlets Interview Questions

what happens if we wont use destroy()?

4 Answers   IBM,


How two servlets communicate with each other?

2 Answers  


How can we invoke another servlet in a different application?

0 Answers  


Which interface should be implemented by all servlets?

0 Answers  


How do cookies work in servlets?

0 Answers  






What is a servlet engine?

0 Answers  


What do you mean by default initialization in java servlet?

0 Answers  


What is context in servlet?

0 Answers  


Can we use threads in Servlets?

0 Answers  


What is the use of attribute in servlets?

0 Answers  


What is difference between Forward() and sendRedirect() methode?

14 Answers   Polaris,


What is difference between cookies and httpsession?

0 Answers  


Categories