How two servlets communicate with each other?

Answers were Sorted based on User's Feedback



How two servlets communicate with each other?..

Answer / tulasi vani

Servlets communicate with each other with the help of
RequestDispatcher objects.

RequestDispatcher rd=getServletConfig().getNamedDispatcher
(...);

... name used to identify a servlet i.e. name given in the
web.xml in the url-pattern

Is This Answer Correct ?    17 Yes 1 No

How two servlets communicate with each other?..

Answer / devendra

Servlets can communiceate with the help of RequestDispacher.

RequestDispacher rd = getRequestDispacher("passing the 2nd servlet url");
rd.forward(rquest,response);

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Servlets Interview Questions

What do you mean by httpservlet and how it is different from the genericservlet?

0 Answers  


What are the security issues in Servlets?

2 Answers  


What do you mean by cgi?

0 Answers  


What is servlet and its types?

0 Answers  


Is Servlet Class Thread safe?????? How to make servlet Thread safe ???

4 Answers   Cognizant,


What is the use of servletconfig interface?

0 Answers  


How session tracking can be achieved, if your browser doesn't support cookies (or) if cookies are disabled?

2 Answers  


How do servlets work?

0 Answers  


What are the difference between RMI and Servlets?

0 Answers  


without session Id can we do any operations like add,update,edit,delete. I saw Session id is loaded for edit and delete action not for add .so am asking this

1 Answers   Syntel,


What is cookie in servlet?

0 Answers  


What is Request Dispatcher?

1 Answers  


Categories