How to pass a requrest object of one servlet as a request
object to another servlet?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What are the benefits of using servlet over cgi?
Should I override the service() method?
can v create a constructor 4 servlet?
Explain jsessionid?
How many Cookies can a host support?
If servlet receives multiple requests, how many objects will it create?
Why the concept of single thread model interface is used?
In which cases Destroy() is invoked?
What are the different methods involved in generic servlet?
What does the term localization refer to?
What is http servlet? Explain with the help of an example.
Which exception is thrown if the servlet is not initialized properly?