I tried to use the <context-param> tag in web.xml:

<web-app>
  <context-param>
    <param-name>foo</param-name>
    <param-value>bar</param-value>
  </context-param>
<web-app>

getInitParameter("foo") returns null

Tomcat version: 3.2.1 for Win32

Ariel

-----Original Message-----
From: Kitching Simon [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 7:52 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Defining an init parameter for all servlets


> -----Original Message-----
> From: Ariel [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 6:52 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      Defining an init parameter for all servlets
> 
> 
> I would like to define some initialization parameters to be used by 
> all servlets running on Tomcat.
> Is there a way to define this in web.xml, besides copying the <init-param>
> section of the global parameter to every servlet's section in web.xml?
[Kitching Simon]  Yep!

To set a parameter accessable by all servlets
*in a web application*, see "context-param" tag
(or is it config-param?) in the sun servlet specification...

>  
> Ariel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to