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
Describe some assignments that are executed by servlet container?
What is the functionality of actionservlet and requestprocessor?
What do you mean by interservlet communication?
What do you mean by annotations in servlet?
What is war file?
Can filter be used as request or response?
What are all the protocols supported by httpservlet?
What is the use of httpservletresponsewrapper?
Can we use the constructor, instead of init(), to initialize servlet?
Is it good idea to create servlet constructor?
How can a servlet be used to generate plain text instead of html?
What is the capacity the doget can send to the server?
What must be implemented by all servlets?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
What are all the advantages of servlet over cgi?