Tomcat调用的init():
public void init(ServletConfig config) throws ServletException{
this.config = config;
this.init();
}
用于重写的init():
public void init( ) throws ServletException{
}
所以重写时候不带参数 否则就要继承父类的构造方法。
Tomcat调用的init():
public void init(ServletConfig config) throws ServletException{
this.config = config;
this.init();
}
用于重写的init():
public void init( ) throws ServletException{
}
所以重写时候不带参数 否则就要继承父类的构造方法。