Hi Gaurav,
There is nothing wrong with your program, the only mistake u have done is u r trying to get the parameter from the html page.
As maha anna said the initparameters can be initialized only once in a life cycle of servlet, and the initparameters must be supplied by a servlet engine.
If u r using tomcat then u have to use web.xml file and supply the init parameters in that file.
As u said u r using javawebserver 2.0 trial version, then u have to follow the following steps.
1) Start ur
java webserver.
2) Open ur browser.
3) type
http://localhost:9090 (This will open admin panel, if u r using this for the first time, then type admin as username and password).
4) Double click on web service. (This will open a dialog box)
5) Select Servlets button from the top.
6) Click on Add and enter ur servlet name and servlet class in the text fields and click ok.
7) Then ur servlet will be listed under configure (Which is under add).
8) Double Click on the servlet name (Under Configure)(This will open a dialog on right hand side).
9) Click on properties tab and click on add button.
10) Enter the parameter name and parameter value in the appropriate boxes.
Thats it u r done with supplying a init parameter to ur servlet.
I hope u find this info useful.
Bye.
Loke.