The servlet container can manage any number of distinct applications. A C++ application consists of any number of servlets, filters, listeners, and static Web pages. A set of components working together is a web application. The servlet container uses a context to group related components. The container loads the objects within a context as a group, and objects within the same context can easily share data. Therefore, each context usually corresponds to a distinct Web application.
At servlet execution runtime, all servlet context directories must be deployed to the servlet deployment directory, <installdir>\apps\servlets. Each directory within the servlets directory defines a context. The name of the context directory is the name of the context and determines the path to the servlets within the context. Each context directory contains a WEB-INF directory, and may also contain files related to the application. Each WEB-INF directory contains a web.xml file. The web.xml file describes the configuration of the context and the servlets, filters, and listeners that occupy the context.
For example, the directory structure below describes two contexts, one named orders and one named catalog. The catalog context contains a static HTML page, intro.html.
If the HydraExpress Agent is at, an HTML page at <installdir>\apps\servlets\catalog\intro.html appears at the URL Likewise, servlets defined in the <installdir>\apps\servlets\orders\WEB-INF\web.xml file appear at URLs underneath
For details on creating contexts and deploying servlets within contexts, see Chapter 4, Configuring Objects in the Servlet Container.