import java.io.FileReader;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Properties;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
public class MyServlet implements Servlet{
private ServletContext context;
//重写了Servlet接口的五个方法
@Override
public void destroy() {
System.out.println(“正在销毁”);
}
@Override
public ServletConfig getServletConfig() {
return null;
}
@Override
public String getServletInfo() {
return null;
}
@Override
public void init(ServletConfig arg0) throws ServletException {
System.out.println("初始化servlet");
//获取一个初始化参数
String name = arg0.getInitParameter("name");
System.out.println(name);
//获取一系列初始化参数&l