public void init() throws ServletException { // Initialization code getServletContext().log("getinit init"); // Get the value of an initialization parameter String value = getServletConfig().getInitParameter("param1");
// Get all available intialization parameters java.util.Enumeration enum1 =getServletConfig().getInitParameterNames(); for (; enum1.hasMoreElements(); ) { // Get the name of the init parameter String name = (String)enum1.nextElement();
// Get the value of the init parameter value = getServletConfig().getInitParameter(name); }
value = getServletContext().getInitParameter("param1"); }
public void doGet(HttpServletRequest req,HttpServletResponse resp) throws IOException {