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 |
Can you explain in detail 'javax.servlet' package?
What are the objects involved when a servlet receives a call from client?
What are the servlet events?
how the server will know its the same jsp page?
What are the types of servlet?
What are the different methods of session management in servlets?
Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?
where the generated jsp source file are stored?
What is the use of request dispatcher interface?
How can we refresh automatically when new data is entered into the database?
What do you mean by session tracking?
How the servlet is loaded?