Shashank ,
As Bear pointed out change your name in accordance to the Ranch's Naming Policy.
Secondly , There is something wrong which you've been doin ! First of all , its not <%= config.getAttribute("mail") %> , It should be <%=config.getInitParameter("mail")%> another thing i would like to point out just FYI. For successfully getting the parameters , You need to access the servlet and not the JSP i.e not Basic.jsp , If you access
http://localhost:8080/yourwebappname/servlet/Basic , You would get the value of mail param.
You would not get correct output if you are using Basic.jsp , because the JSP
engine creates two different instances of the generated servlet class , one for accessing
it as a named servlet and one for accessing it as a JSP page and will pass each servlet
instance a different ServletConfig object. In order to be able to use the same servlet
instance and hence the same configuration when using either of the URLs mentioned, we have to explicitly map the JSP page�s URL in the deployment
descriptor file using the <servlet-mapping> element like this :
Hope this helps you..
Yogendra Joshi.