tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Horvath" <horzs...@mail.tiszanet.hu>
Subject getinitParameter
Date Tue, 17 Jul 2001 07:43:35 GMT

Hi !
 
I have a web.xml file with this lines:
 
    <context-param>
      <param-name>valami</param-name>
      <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
      <description>
        The database driver's type. 
      </description>
    </context-param>

    <servlet-name>getInit</servlet-name>
      <description>
 No desc.
      </description>
      <servlet-class>getinit.mainServlet</servlet-class>
      <init-param>
        <param-name>valami</paramName>
        <param-value>com.mycompany.myactions.ListOrdersAction</param-value>
      </init-param>
    </servlet>
How can I acces the valami variable inside a servlet (in JSP works). I use getServletConfig.getInitParameter("valami")
and I always get null !!! I don't understand !!!
Or I have to use getServletContext.getInitParameter instead ?

Thanx.


Mime
View raw message