Article:
  How Servlet Containers Work
Subject:   Worry
Date:   2003-05-28 05:47:41
From:   anonymous2
In the first listing of this article, that shows the servlet lifecicle, there is a mistake. In the init method we must call the init from de superclass.


Some servlet container adjust certain context variable in init, and in many projects I waste my time why the application context is not working ok. Be aware that you must call the init from the superclass

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Worry
    2007-04-01 00:44:39  NDLexus [View]

    calling super.init() doesn't even resolve in my case. Deploying the servlet given in this example and all the others on the net, doesn't trigger the init() method. And when some examples say to call super.init(), there's no such method in super to be resolved, so from the init() method below, I'm not able to call super.init(). Please advice as what's going on wrong?

    public class PrimitiveServlet implements Servlet {

    public void init(ServletConfig config) throws ServletException {
    System.out.println("init");
    }
    ....
    }

  • Some Worry
    2003-08-29 03:49:20  anonymous2 [View]

    infact i added super.init(config), unfortunately i was unable to compile the PrimitiveServlet.java file.
    When i called the PrimitiveServlet from browser i got the out put but in the console i didn't find the output of init() method or the destroy() method. Can anybody tell me what would be the possible reason of this.