Finally, I'm not alone!!  I have 3.2 beta 6 as well.  Here is a how I have web.xml set up:

<web-app>
    <context-param>
        <param-name>test1</param-name>
        <param-value>here1</param-value>
    </context-param>
    <servlet>
        <servlet-name>myservlet</servlet-name>
        <servlet-param>MyServlet</servlet-param>
        <init-param>
            <param-name>test2</param-name>
            <param-value>here2</param-value>
        </init-param>
    </servlet>
</web-app>

I can access the "test1" parameter by calling getServletConfig().getServletContext().getInitParameter("test1").  But I cannot access the "test2" parameter at all.  For example calling getServletConfig().getInitParameter("test2") returns null.

Paul

Jason Bowman wrote:

 Hello, I had used the <init-params> successfully before. I have, however, just downloaded the latest version of Tomcat 3.2b6 and I am having the same problem you are. I personally believe that this is a bug that was introduced to the code and will post another message reporting that. I am curious thou, you said that you got <context-params> to work... how did you do this? Thanks,Jason B.
-----Original Message-----
From: Paul Hoepfner-Homme <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, October 26, 2000 12:27 PM
Subject: Re: Frustration with getInitParameter
 I have it set up *exactly* as you have described.  I am positive that I have defined web.xml correctly too.  I have written my servlet's class name correctly, and I have correctly defined init parameters for that servlet, but my enumeration of init parameter names (using config.getParameterNames()) has zero elements.

Paul

--
Paul Hoepfner-Homme
[EMAIL PROTECTED]

OVEN Digital | http://www.oven.com/
 


Reply via email to