Dumitru,
I am assuming that you are accessing the page as a jsp and seeing the result that you described.
You must create a servlet mapping to map the servlet instance that you have defined to the url for your jsp. Then when you try to access the jsp page with that mapped url
pattern, the corresponding mapped servlet will be called and the init params defined for the servlet will come into play.
<servlet-mapping>
<servlet-name>ParamsTest</servlet-name>
<url-pattern>/jspGetParams.jsp </url-pattern>
</servlet-mapping>
(Note: If you access it as the named servlet, you do get the init params correctly. Its only when you access the jsp directly without having this mapping, the container just creates another servlet instance for the jsp page without any init params.)
Hope this explains the behavior,
- ortimuS
[ May 03, 2004: Message edited by: ortimus tilap ]
[ May 03, 2004: Message edited by: ortimus tilap ]