You need to be careful with this - I've had problems with the compiler not
recognising getLogger() if the code below is inside a class in your XSP page
(which becomes an inner class of the page class).  Presumably a bug in the
JDK (1.3.1, running on Win2K), as it should work.


Tim Bentley

> -----Original Message-----
> From: Giacomo Pati [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 27 August 2001 11:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to log from a Java class ?
> 
> 
> Quoting Cyril Cambien <[EMAIL PROTECTED]>:
> 
> > I understand how to log from a xsp file using the log.xsl 
> logicsheet but
> > what is the best way to log information from the Java classes called
> > from my xsp files ?
> 
> Make them implement Loggable and pass the logger to them 
> 
>     <xsp:logic>yourClassInstance.setLogger(getLogger());</xsp:logic>
> 
> Giacomo
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to