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 are the benefits of using servlet over cgi?

0 Answers  


Should I override the service() method?

0 Answers  


can v create a constructor 4 servlet?

7 Answers   Satyam,


Explain jsessionid?

0 Answers  


How many Cookies can a host support?

2 Answers  






If servlet receives multiple requests, how many objects will it create?

0 Answers  


Why the concept of single thread model interface is used?

0 Answers  


In which cases Destroy() is invoked?

2 Answers  


What are the different methods involved in generic servlet?

0 Answers  


What does the term localization refer to?

0 Answers  


What is http servlet? Explain with the help of an example.

0 Answers  


Which exception is thrown if the servlet is not initialized properly?

0 Answers  


Categories