If you had
String name = config.getInitParameter(companyName);
it might work ;)
HTH,
Jon
Michael Jones wrote:
Hello-
I'm trying to store some values in my server.xml and then get them with my
Servlet.
I followed the instructions at:
email. Thank you.
:: -Original Message-
:: From: Jon Wingfield [mailto:[EMAIL PROTECTED]
:: Sent: Thursday, March 25, 2004 12:22 PM
:: To: Tomcat Users List
:: Subject: Re: Getting Context Parameters from server.xml
::
:: If you had
:: String name = config.getInitParameter(companyName
Oops. Sent too soon. That code would only work if your parameters were
set up in you web.xml not server.xml
ie
context-param
param-namecompanyName/param-name
param-valueMyCompany/param-value
/context-param
The original code was looking up the servlet's init parameter, which
should
Users List
Sent: 25/03/2004 10:22
Subject: Re: Getting Context Parameters from server.xml
If you had
String name = config.getInitParameter(companyName);
it might work ;)
HTH,
Jon
Michael Jones wrote:
Hello-
I'm trying to store some values in my server.xml and then get them
with my
Servlet
Sweet that was the trick.
Thanks alot for all of the responses.
-Michael
On Thu, 25 Mar 2004, Bodycombe, Andrew wrote:
I think you want to use getServletContext().getInitParameter(companyName);
There is a difference between a servlet init parameter (defined in web.xml)
and a servlet