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:
*Deploy the files that contain the compiled servlets, filters, and listeners that the context will contain (Deploy the Compiled Object Files). All contexts require this step.
*Create a context directory that contains a WEB-INF directory and create a web.xml file within the WEB-INF directory (Create a Context Directory). All contexts require this step.
*Add context parameters to the web.xml file (Set Context Parameters).
*Define servlets and map them to URL patterns (Define and Map Servlets).
*Define filters and map them to URL patterns (Define and Map Filters).
*Define listeners (Define Listeners).
*Define error page handlers (Configure Error Pages).
*Define session characteristics (page 50 ).
*Configure an external Web server (Forward Requests From a Web Server).
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.