tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Question about context-param
Date Thu, 16 Jan 2003 21:02:46 GMT
Howdy,

>Ok that worked great. I don't get the exceptions anymore but for some
>reason it's not pulling the
>params from the web.xml.  Any Ideas?

If the code below is taken from a servlet, then this.getInitParameter()
will look for an init-parameter element inside the <servlet> element.
To get a context parameter from a servlet, you do:
String userName = getServletContext().getInitParameter("oracleUser");

By the way, I don't remember if you mentioned what tomcat version you're
using.  But if you're using tomcat 4.x, you web.xml should be compliant
with the 2.3 spec version, not 2.2.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message