dcsimg

How do I write to a log file using JSP under Tomcat? Can I make use of the log() method for this?

Serge Knystautas

Yes, you can use the Servlet API's log method in Tomcat from within JSPs or servlets. These messages are stored in the server's log directory in a file called servlet.log.