786snow
Programmer
- Nov 12, 2006
- 75
Hi,
I am new to java servlet. I am trying to understand this code. Is init() function in java servlet is like a constructor it gets executed with out having to call that function.? and what is super.init, here i believe they are calling the init() function of the parent class?
public class EDocsServlet extends BaseServlet
{
public void init()
{
super.init();
customerAccessOnly = false;
}
protected RequestProcessor getRequestProcessor(Log log)
{
return new EDocsRequestProcessor(log);
}
protected WebController getWebController(EjbController ejbController, Log log)
{
return new EDocsWebController(ejbController, log);
}
protected EjbController getEjbController(Log log)
{
return new EDocsController(log);
}
}
I am new to java servlet. I am trying to understand this code. Is init() function in java servlet is like a constructor it gets executed with out having to call that function.? and what is super.init, here i believe they are calling the init() function of the parent class?
public class EDocsServlet extends BaseServlet
{
public void init()
{
super.init();
customerAccessOnly = false;
}
protected RequestProcessor getRequestProcessor(Log log)
{
return new EDocsRequestProcessor(log);
}
protected WebController getWebController(EjbController ejbController, Log log)
{
return new EDocsWebController(ejbController, log);
}
protected EjbController getEjbController(Log log)
{
return new EDocsController(log);
}
}