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

Why are servlets used?

0 Answers  


How can I share objects across different sessions?

2 Answers   Accenture,


how a user session can be tracked in servlets?

1 Answers  


What are different ways for servlet authentication?

0 Answers  


What is the life cycle of a servlet?

1 Answers  






What exactly are the functions of servlet?

0 Answers  


Is java servlet still used?

0 Answers  


Explain request dispatcher and its methods.

0 Answers  


What is Servlet API used for connecting database?

0 Answers  


What are different types of SessionTracking?

2 Answers  


When the methods init() and Distroy() will be called?

2 Answers  


what is EJB and Java servlet

2 Answers  


Categories