--- Harry Mantheakis
<[EMAIL PROTECTED]> wrote:
> The Tomcat log files are located in the
> CONTAINER_HOME/logs directory.
> 
> To print out debugging statements in Servlets use
> the GenericServlet.log()
> method. Within HttpServlets all you have to do is
> call "log(...)". Here is
> an example which presupposes it is within a 'catch'
> block in which an
> IOException called "exception" has been caught:
> 
>     log( "Connection Error" + exception.getMessage()
> );
> 
> To print out debugging statements in JSPs use the
> ServletContext.log()
> method. JSPs automatically inherit a reference to
> their ServletContext in
> the built-in object called "application". All you
> have to do is call
> "application.log(...)" within a Java code block in
> your JSPs. Hence, the
> previous example would be written as follows:
> 
>     application.log( "Connection Error" +
> exception.getMessage() );
> 
> With a bit of luck you should be able to open log
> files in your favourite
> text editor and monitor the printouts as they occur.
> (Try setting the editor
> so that it automatically refreshes itself.)

Or "tail -f $FILENAME" in an xterm window.

You could also debug servlets in NetBeans. I have used
that on Linux. (I am assuming your dev box is running
Linux with X on it.)

EKMacAdie



__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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

Reply via email to