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

4.5 Create a Context Directory

Servlet contexts must be placed in the Agent directory <installdir>\apps\servlets. Each directory beneath <installdir>\apps\servlets defines a context. To create a new servlet context, simply create a new subdirectory under <installdir>\apps\servlets.

For example, to create a context named myapp, create a directory with that name under <installdir>\apps\servlets. Create a WEB-INF directory under myapp, and the context directory structure is complete. Before starting the container, create a web.xml file in the WEB-INF directory. The final directory structure is shown below:

In this example, the servlets directory contains a single context directory named myapp. At Agent startup, the container is initialized and creates a context named myapp and configures the context as specified in the <installdir>\apps\servlets\myapp\WEB-INF\web.xml file.

The servlets directory may contain any number of servlet contexts. Each context contains static Web pages and/or servlet definitions. Each context must also have its own web.xml file, describing which servlets are available within that context. Such a collection of contexts can be considered a Web application.

If using an external Web server, it must be configured to forward requests for the new context. See Section 4.12 for details.

A HydraExpress web.xml file closely resembles a Java servlet web.xml file. The root element of the file is the web-app element, as shown below:

All other configuration elements within the file must appear within the web-app element. The rest of this chapter covers the contents of the context web.xml file in detail.

Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.