Thanks Mike/Maha for the reply.
But I am getting a weird probelem.
I am not able to retrieve the init parameter. I am getting Null.
My code in the web.xml (in
tomcat 3.2.1) is as follows:
:
<servlet>
<servlet-name>Demo1</servlet-name>
<servlet-class>Demo1</servlet-class>
<init-param>
<param-name>Name</param-name>
<param-value>Mike</param-value>
</init-param>
</servlet>
:
In case of my servlets file this is what I have
public class Demo1 extends HttpServlet {
String N1= null;
public void init(ServletConfig config) throws ServletException {
super.init(config);
N1= config.getInitParameter("Name");
System.out.println("N1 is "+N1);
:
:
}
}
The o/p is N1 is null.
Is it anything to do with my setup,
i.e Jdk1.2.2, JSDK2.0 , tomcat 3.2.1.
Thanks.