Why should we go for interservlet communication?

Answers were Sorted based on User's Feedback



Why should we go for interservlet communication?..

Answer / 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

Why should we go for interservlet communication?..

Answer / ravikiran.chd

inorder to continue the flow by passing the response as a
request to the next servlet

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Servlets Interview Questions

Name the packages that work with servlet?

0 Answers  


What are the difference between RMI and Servlets?

0 Answers  


What is the use of servlet context?

0 Answers  


What are the different mode that servlets can be used?

0 Answers  


Explain the difference between GET and POST methods?

6 Answers  






how the HTML data stored in web server?

0 Answers   TCS,


How is an application exception handling is done using a servlet?

0 Answers  


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

0 Answers  


What is load-on-startup in servlet?

0 Answers  


What is a Proxy Server?

1 Answers  


What is new in ServletRequest interface ? (Servlet 2.4)

0 Answers  


What are the differences between servlet context vs servlet config?

0 Answers  


Categories