How do you pass the data from one servlet to another
servlet?
Answer Posted / tulasi vani
We can pass the data from one servlet to another using
RequestDispatcher object.
1.RequestDispatcher rd=getServletContext.getNamedDispatcher
("...");
rd.forward(request,response);
... means use the name of the url-patterns you have
specified for the servlet in web.xml.
| Is This Answer Correct ? | 34 Yes | 15 No |
Post New Answer View All Answers
What are the functions of an intercepting filter?
What is difference between server and servlet?
What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?
What is servlet? Explain
Explain the difference between get and post method in servlet?
Define context initialization parameters.
What are some disadvantages of storing session state in cookies?
Does servlet have main method?
How can we implement a jsp page?
How do we translate jsp?
What is servlet and how it works?
Is it possible to have a constructor inside the servlet?
Why doesn’t a servlet include main()? How does it work?
How we can get ip address of client in servlet?
Is it good idea to create servlet constructor?