Hi Paul,
When you say "the servlet's getInitParameter("test")" what *exactly* do you
mean?
Do you mean that your servlet's init method is like:
public void init(ServletConfig config) throws ServletException {
super.init(config);
Object o = config.getInitParameter("test");
....
If so, then all I can say is it works for me.....
According to the docs, you should also be able
to do this inside the service method:
Object o = this.getServletConfig().getInitParameter("test");
I haven't tried this, though..
Regards,
Simon
> -----Original Message-----
> From: Paul Hoepfner-Homme [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 26, 2000 4:26 PM
> To: [EMAIL PROTECTED]
> Subject: Frustration with getInitParameter
>
> Tomcat 3.2 beta 6. I have a servlet in the ROOT context. The web.xml
> file in webapps/ROOT/WEB-INF has this entry:
> <servlet>
> <servlet-name>...</servlet-name>
> <servlet-class>MyServlet</servlet-class>
> <init-param>
> <param-name>test</param-name>
> <param-value>here</param-value>
> </init-param>
> ...
> </servlet>
>
> From MyServlet I use the servlet's getInitParameter("test") method and it
> returns null. When I try to iterate through the parameter names, there
> are none to iterate through.
>
> What am I doing wrong??
>
> Thanks
> --
> Paul Hoepfner-Homme
> [EMAIL PROTECTED]
>
> OVEN Digital | <http://www.oven.com/>
>