Answer Posted / imtiyaz
There are three major reasons to use interservlet
communication:
Direct servlet manipulation
A servlet can gain access to the other currently loaded
servlets and perform some task on each. The servlet could,
for example, periodically ask every servlet to write its
state to disk to protect against server crashes.
Servlet reuse
One servlet can use another's abilities to perform a task.
Think back to the ChatServlet from the previous chapter. It
was written as a server for chat applets, but it could be
reused (unchanged) by another servlet that needed to
support an HTML-based chat interface.
Servlet collaboration
The most common, situation involves two or more servlets
sharing state information. For example, a set of servlets
managing an online store could share the store's product
inventory count. Session tracking is a special case of
servlet collaboration.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What do you mean by filter in servlet?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
How do you define a servlet?
Can we refresh servlet in client and server side automatically?
Explain how does JSP handle run-time exceptions?
Which HTTP method is non-idempotent?
Why jsp is better than servlet?
Which interface should be implemented by all servlets?
What are the advantages of Servlet over CGI?
What are the uses of servlets?
How are filters?
How can we refresh automatically when new data has entered the database?
Is java servlet still used?
Name the different ways of session tracking.
What is servlet and list its types?