>From a previous answer I gave:

In the JSDK api in HttpServlet there's the method getServletContext()
which returns the current context. The ServletConext then has a method
called log(), and guess what, this is the thing you need!
It works similar to System.out.println(), the famous debugging method
for the real experienced java programmer ;-)

To make sure that you log file contains the log ouput add/change the
following in jserv.properties:
log.file=/usr/local/jserv/logs/jserv.trace
log.channel.servletLog=true   <-- THIS IS THE MOST IMPORTANT ENTRY!!!!!!

Make sure that log.file is fully qualified, otherwise you might get in
troubles.
Of course, set the log.file to what you nedd!

The other log.channel.* params are for debugging jserv itself, so maybe
you wish to disable them, but some of them are still usefull.



Andreas Schildbach wrote:
> 
> Hello,
> 
> I just installed ApacheJServ 1.0 and moved over a servlet that was
> previously run on a WinNT platform with SUN's Servletrunner.
> 
> Unfortunately, the Servlet now throws some exceptions (Null Pointer etc).
> How can I have a look at the stack trace of the exceptions, and how can I
> insert debug output into the Servlet? (System.out.println does not work)
> 
> Thanks for any information!
> 
> - Andreas
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> READ THE FAQ!!!!     <http://java.apache.org/faq/>
> Archives and Other:  <http://java.apache.org/main/mail.html/>
> Problems?:           [EMAIL PROTECTED]

-- 
Guenther Wieser      
creative-it/Guenther Wieser Software KEG
Student of Telematik at Graz University of Technology
http://www.creative-it.com        mailto:[EMAIL PROTECTED]
-> In A World Without Walls And Fences, Who Needs Windows And Gates? <-


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to