Name

<context-param>

Synopsis

Using the <context-param> element, you can define context parameters that are available to all components of the application (both servlets and JSP pages).

Syntax

<context-param>
  [<description [xml:lang="lang"]>description</description>]*
  <param-name>paramName</param-name>
  <param-value>paramValue</param-value>
<context-param>

The <param-name> subelement specifies the name and the <param-value> element the value. Optionally, the <description> element can be used for a description that can be displayed by a deployment tool:

<context-param>
  <param-name>jdbcURL</param-name>
  <param-value>jdbc:idb:/usr/local/db/mydb.prp</param-value>
</context-param>

The JSF specification defines the following context parameters:

javax.faces.CONFIG_FILES

Optionally defines a comma-separated list of context-relative paths for JSF configuration files. See Chapter 13 for details.

javax.faces.DEFAULT_SUFFIX

Optionally defines a suffix (file extension) for the JSP pages that contains JSF component action elements, to use a different one than the default (.jsp). If you define a nondefault suffix, you must also define that this suffix represents a JSP page, using the <jsp-config> element in a Servlet 2.4/JSP 2.0 container or an implementation-dependent mapping in a Servlet 2.3/JSP 1.2 container.

javax.faces.LIFECYCLE_ID

Optionally defines a lifecycle identifier other than the default set by the javax.faces.lifecycle.LifecycleFactory.DEFAULT_LIFECYCLE constant.

javax.faces.STATE_SAVING_METHOD ...

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.