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

4.1 Introduction

Each servlet, filter, and listener in the servlet container exists within a context. This chapter describes the tasks involved in creating a new context and configuring a context.

Each servlet and each filter must have a URL pattern mapping, and may have initialization parameters. Section 4.3 discusses initialization parameters. Section 4.4 explains URL pattern matching. The remainder of the chapter, beginning with Section 4.5, describes tasks associated with adding a context, as summarized in the next section.

4.1.1 Procedure for Adding a Context

The list below describes the tasks that could be involved in adding a servlet context. The first two tasks, deploying the libraries needed by the context and creating a context directory, are required for all contexts. The other tasks may or may not be required depending on the needs of the context. For example, if no servlets or filters in the context depend on context parameters, there is no need to add parameters to the context.

To add a context:

To activate a new context, it must be loaded into the HydraExpress Agent. This is done simply by stopping and restarting the Agent, as described in Chapter 4, "Agent Administration," of the HydraExpress User Guide. The Agent reports unrecoverable errors to the console. Errors defined in the context web.xml file are written to the Agent log, assuming the Agent has logging enabled.

4.1.2 Procedure for Adding a Servlet

To add a servlet to an existing context, follow the steps below:

Stop and restart the Agent to load the servlet.

4.1.3 Procedure for Adding a Filter

To add a filter to an existing context, follow the steps below:

Stop and restart the Agent to load the servlet and its associated filter.

4.1.4 Procedure for Adding a Listener

To add a listener to an existing context, follow the steps below:

Stop and restart the Agent to load the servlet and its associated listener.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.