A convenience method which can be overridden so that
there's no need to call super.init(config).
Instead of overriding init(ServletConfig), simply override
this method and it will be called by
GenericServlet.init(ServletConfig config). The ServletConfig
object can still be retrieved via getServletConfig().
>>>
In other words, you can write your own
MyServlet.init() method, that will override the init()
method in GenericServlet and it will be called by GenericServlet.init(ServletConfig config). If you
decide to override init(ServletConfig config) instead,
then you should call super.init(config).
Again, from the Javadocs:
<<<
public void init(ServletConfig config)
throws ServletException
Called by the servlet container to indicate to a servlet
that the servlet is being placed into service. See
Servlet.init(javax.servlet.ServletConfig).
This implementation stores the ServletConfig object it
receives from the servlet container for alter use. When
overriding this form of the method, call super.init(config).
Specified by: init in interface Servlet
Parameters:
config - the ServletConfig object that contains configutation
information for this servlet
Throws:
ServletException - if an exception occurs that interrupts
the servlet's normal operation
See Also: UnavailableException
>>>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.