"Brett W. McCoy" wrote:
> On Tue, 27 Feb 2001, Shahed Ali wrote:
>
> > Sorry for this stupid question,
> > but how do I use the log() method in servlets ?
> >
> > In JSP application.log() seems to work,
> > but in servlets, I tried getServletContext().log("adad") etc and
> > I keep getting NullPointerExceptions
>
99.9% of the time, this is caused by having a method like this in your servlet:
public void init(ServletConfig config) throws ServletException {
...
}
but forgetting to call super.init(config) inside. The easiest way to avoid
this is to convert your servlet to the no-args version of init() instead.
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]