context initialization Parameter
context initialization Parameter
Uses include things like defining an administrator email address to send errors from your
application, or other settings that are relevant to your application as a whole.
See advantages of specifying parameter values in web.xml for reasons you would want to
use this method.
To access the values from your Java/JSP code, use the following syntax:
The actual parameter name and value are set using <param-name> and <param-value>.
<context-param>
<description>The email address of the administrator, used to send
error reports.</description>
<param-name>webmaster</param-name>
<param-value>[email protected]</param-value>
</context-param>
With the above example, you can extract the value of the webmaster parameter with: