The Throwable argument is optional.
This is a different problem.

The GenericServlet has a log() service.
You do not need to seek ServletContext
to log messages within the HttpServlet methods
At any rate, you pl post the stack trace?

Rk
x77309

-----Original Message-----
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: log() ?


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

The function signature is log(String message, Throwable, throwable).  Is
this what might be casuing the null pointer exception?

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Stupidity, like virtue, is its own reward.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to