javax.servlet.ServletException: Servlet.init() for servlet GetInit threw exception 完全按老师代码打的,这是什么问啊。
init方法不要用带参数的
应该使用
@Override
public void init() throws ServletException {
System.out.println(this.getInitParameter("name"));
}上面这个初始化参数,不能使用下面的这个初始化参数
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
}