Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Development Guide

4.3 Servlet and Filter Initialization Parameters

Some servlets and filters require initialization parameters. The init-param element within a filter or servlet definition element contains initialization parameters for that filter or servlet instance. These are distinct from context parameters, discussed in Section 4.7. Each init-param contains a param-name element and a param-value element. Although the servlet container does not interpret the contents of the param-name and param-value, 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.

The web.xml snippet below defines two initialization parameters for a servlet, greeting and fontsize, and two for a filter, request and response.

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.7 describes the interface a servlet or filter uses to read initialization parameters.



Previous fileTop of DocumentContentsNo linkNext 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.
Provide feedback to Rogue Wave about its documentation.