How two servlets communicate with each other?
Answers were Sorted based on User's Feedback
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 |
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 |
Write a simple servlet program to print the contents of html.
Explain jsessionid and when is it created?
What is the directory structure of web application?
Define the lifecycle for executing a jsp page.
what is the difference between doGet() and doPost()?
When the methods init() and Distroy() will be called?
Explain servlet life cycle?
request parameter how to find whether a parameter exists in the request object?
What do you understand by mime type?
How to run a servlet program?
What do you mean by web applications? Explain web application directory arrangement?
What are the types of protocols supported by httpservlet ?