How do you pass the data from one servlet to another
servlet?
Answer Posted / vinod muda
In First Servlet i.e Test
String name = "Vinod";
request.setAttribute("name",name);
RequestDispatcher dis = request.getRequestDispatcher
("Test2");
dis.forward(request, response);
---------------------------------------
Now in Second Servlet i.e Test2
String name = (String) request.getAttribute("name");
| Is This Answer Correct ? | 29 Yes | 10 No |
Post New Answer View All Answers
Explain url encoding in servlet?
How does java thread pool work?
Explain servlet.
Write a hello world program using servlets.
What if you need to span your transaction across multiple servlet invocations?
Which protocol will be used by browser and servlet to communicate
Whether we can get deadlock situation in servlets?
How do you find out what client machine is making a request to your servlet
What do you mean by filter in servlet?
What is the difference between Servlets and Applets?
What is cgi?
Differentiate between the print writer and servlet output stream?
How the servlet is loaded?
What is meant by servlet? What are the parameters of the service method?
what is multiple server?