Apparently the following is generating a loop(the GenericServlet class is calling the subclass’s init())
public void init() throws ServletException {
ServletConfig c = this.getServletConfig();
super.init(c);
}
I’m probably just doing this wrong. Thank you guys in advance!
Remove the
super.init(c);line. You only need to call this ininit(ServletConfig)method, not in theinit()withoutServletConfigargument. That’s also exactly what the linked javadoc tells:The infinite loop is indeed caused because the default
init(config)implementation is under the hoods calling theinit().