| 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.
|
||
Showing messages 1 through 2 of 2.
-
Some Worry
2003-08-29 03:49:20 anonymous2 [View]
-
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");
}
....
}



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.