Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Development Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

2.1 The Servlet Approach

The servlet API includes a set of classes for creating servlets. Its design is based on the Java Servlet API, implemented in C++.

A servlet is a component that generates dynamic content to run inside a servlet container. For HydraExpress, the container is hosted inside the HydraSCA's service execution engine, generally referred to simply as the Agent. The servlet container provides the runtime environment for the servlet. The Agent handles the details of network programming, receives and parses requests, transmits responses, and manages connections. The servlet container instantiates the servlets and maintains state. The servlet itself focuses on application logic.

The servlet container is implemented as a pluggable handler in the Agent's handler chain. This modular design provides you with the flexibility to either retain it in your chain or to remove it, depending on whether you expect your system to handle servlets.

The Agent never communicates directly with the requestor (client). Instead, the Agent routes servlet requests to the servlet container. This configuration allows the Agent to manage security. The container may also serve static files related to the Web services in the container, such as WSDL definitions, XML Schemas, or HTML pages.

At first glance, a servlet may seem similar to a Web server plug-in. However, there are several important differences. The servlet API is designed to be easy to use and to encapsulate the details of handling a response. The API does not provide access to the inner workings of the Agent, but instead provides the features necessary for creating dynamic content. The servlet API is portable between Web servers and Agents, so that a servlet need not depend on a particular server or a particular platform. The servlet may run in a separate process from the server, and can even be hosted on a different machine or Web server. Finally, a servlet has access to general-purpose classes unrelated to the Agent. For example, Java servlets rely on the JDK, while HydraExpress servlets may depend on SourcePro C++.

This chapter discusses the concepts and implementation of the servlet API and the servlet container, a component of the Agent. For information on the overall Agent and its architecture, see the Introduction to HydraExpress.

The HydraExpress servlet container has two distinct aspects:

Understanding these components, and the relationship between them, is key to understanding the HydraExpress's servlet development and hosting capabilities.



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.