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

Can you explain in detail 'javax.servlet' package?

0 Answers  


What are the objects involved when a servlet receives a call from client?

0 Answers  


What are the servlet events?

0 Answers  


how the server will know its the same jsp page?

3 Answers   HCL,


What are the types of servlet?

0 Answers  






What are the different methods of session management in servlets?

0 Answers  


Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?

7 Answers  


where the generated jsp source file are stored?

7 Answers   HCL,


What is the use of request dispatcher interface?

0 Answers  


How can we refresh automatically when new data is entered into the database?

0 Answers  


What do you mean by session tracking?

0 Answers  


How the servlet is loaded?

0 Answers  


Categories