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

4.2 Initialization Parameters

Some servlets and filters require initialization parameters. The init-param element of a filter or servlet definition contains initialization parameters for that filter or servlet instance. Each init-param contains a param-name element and a param-value element. The servlet container does not interpret the contents of the param-name and param-value. However, the contents of these elements must be legal XML. If the web.xml file is in UTF-16, the servlet container transcodes the contents of the param-name and param-value to UTF-8.

For example, the web.xml snippet below defines two initialization parameters, greeting and fontsize.

An init-param element must appear within a servlet or filter definition (see Section 4.7 and Section 4.8). The web.xml fragment below is a full servlet definition containing the init-param elements above:

If a definition contains two or more parameters with the same name, the container will present one param-value and ignore the others.

Section 6.8 describes the interface a servlet or filter uses to read initialization parameters.



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.