Invoking Other Web Resources

Web components can invoke other Web resources in two ways: indirectly and directly. A Web component indirectly invokes another Web resource when it embeds a URL that points to another Web component in content returned to a client. In the Duke's Bookstore application, most Web components contain embedded URLs that point to other Web components. For example, ShowCartServlet indirectly invokes the CatalogServlet through the embedded URL /bookstore1/catalog.

A Web component can also directly invoke another resource while it is executing. There are two possibilities: The Web component can include the content of another resource, or it can forward a request to another resource.

To invoke a resource available on the server ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.