Hi,
I want to send some init paramets to my InitJsp file. I am not able to do it in the
Jsp as mentioned in HeadFirst
servlets and Jsp book. I will just write the code for more clarificatio.
In the web.xml
<servlet>
<servlet-name>MyJsp</servlet-name>
<jsp-file>/InitJsp.jsp</jsp-file>
<init-param>
<param-name>email</param-name>
<param-value>
abc@acs.co.in</param-value>
</init-param>
</servlet>
And in the Jsp file
<%! public void jspInit(){
ServletConfig sConfig = getServletConfig();
String mailId = sConfig.getInitParameter("email");
System.out.println("The mail id is "+mailId);
%>
Kindly let me know how to make it work. Also what is the servlet name i should give in <servlet-name> tag in the DD.
Thanks and Regards,
Pradeep