tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Rudnicki <>
Subject Re: Bug in InvokerServlet: NullPointerException, tomcat totally dies
Date Wed, 07 Jun 2000 05:36:13 GMT
> > > So the problem in InvokerServlet is the same thing: it is trying to
> > > reference an instance variable ("context") which was set in its init()
> > > method, but it's null, which means that the init() method must never
> > > have been called!
> >
> > Just on a chance:
> > Does the servlet call super() in its init?
> > I remember seeing this reported as a common mistake that causes
> >
> No, neither my servlet nor InvokerServlet calls super().  I'm pretty
> sure it should not, right?


That is backwards.  Why would you _not_ call super.init(config)???  Your
derived class hides
the base class method, so you must call it as such:

public void init(ServletConfig config) throws ServletException {
    // more

What I don't remember is what problems are caused by omitting the call.  I
only remember that it caused "flaky"
behavior.  After seeing that, I saw a bunch of my classes where missing it


View raw message