import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class InitServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter pw = response.getWriter(); pw.print("Init Parameters are : "); Enumeration enumeration = getServletConfig().getInitParameterNames(); while(enumeration.hasMoreElements()){ pw.print(enumeration.nextElement() + " "); } pw.println("\nThe email address is " + getServletConfig().getInitParameter("AdminEmail")); pw.println("The address is " + getServletConfig().getInitParameter("Address")); pw.println("The phone no is " + getServletConfig().getInitParameter("PhoneNo")); } }