In HFSJ page# 308, it says init params can be read in a
jsp by using <jsp-file> tag as follows -
<
servlet>
<servlet-name>ServTest</servlet-name>
<jsp-file>/index.jsp</jsp-file>
<init-param>
<param-name>level</param-name>
<param-value>10th</param-value>
</init-param>
</servlet>
index.jsp code -
<%= config.getInitParameter("level") %>
But it prints "null". I cant understand why JSP cant read the init param. Please help me understand where I am going wrong.
Question2 -
I put both <jsp-file> and <servlet-class> tags in <servlet> (using Eclipse
IDE)and it gives error, its ok if I have only one of them present. Can't we put both of them together in <servlet> tag?