The JavaTM Tutorial

| Start of Tutorial > Start of Trail | Search Feedback Form

Trail: Servlets

## Lesson: Servlet Communication

> To satisfy client requests, servlets sometimes need to access network sresources: other servlets, HTML pages, objects shared among servlets at the same server, and so on.

> If your servlet requires a network resource, such as a servlet running in a different server, one can make an HTTP request of the other. This lesson, however, shows you what to do if your servlet requires a resource available from its own server:

> - Using Other Server Resources (JSDK 2.1) such as other servlets, HTML pages, and so on, with a `RequestDispatcher` object.
> - Sharing Resources Among Servlets (JSDK 2.1), where the resource is an object in the Java programming language, made available as an attribute.
> - Calling Servlets from Servlets (JSDK 2.0) by getting the other servlet's `Servlet` object and calling its public methods directly.

| Start of Tutorial > Start of Trail | Search Feedback Form