jsp get init parameter??
843841Aug 13 2003 — edited Aug 13 2003I wrote a jsp(my.jsp):
<%= config.getInitParameter("id") %>
<%= application.getInitParameter("id") %>
<%= getServletConfig().getInitParameter("id") %>
and configure web.xml of Tomcat4.1 like this:
<servlet>
<servlet-name>getInit.jsp</servlet-name>
<jsp-file>/temp/getInit.jsp</jsp-file>
<init-param>
<param-name>id</param-name>
<param-value>0</param-value>
</init-param>
</servlet>
but when i load jsp
http://localhost/temp/my.jsp
it only shows
null null null
why??? how to configure web.xml let jsp to get init parameter??
thx all.