1 | public void init (ServletConfig config) |
2 | The init method is invoked when the servlet is first started. For permanent servlets, this is when the server is started. |
3 | The init method is called only once and is guaranteed to finish before any calls to the service method. |
4 | The ServletConfig object passed as the parameter has a method getServletContext ( ) that returns a ServletContext with information about the servlet environment. |