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

How we can call a jsp from the servlet?

0 Answers  


Why do we have servlet filters?

0 Answers  


how many jsp scripting elements are there and what are those?

0 Answers  


What’s the use of the servlet wrapper classes??

0 Answers  


What is difference between Forward() and sendRedirect() methode?

14 Answers   Polaris,






What is the procedure of invoking different servlet in a different application?

0 Answers  


What is the workflow of a servlet?

0 Answers  


What are the key methods that are involved in processing of http servlets?

0 Answers  


Is servlet a framework?

0 Answers  


What is servlet name in web xml?

0 Answers  


How do you load an image in a Servlet?

0 Answers  


Explain url encoding?

0 Answers  


Categories