|
Java™ by example!
|
|
|
How do I log strings or exceptions to my JSP engine?
The HttpServlet class extends from the GenericServlet superclass. This latter has two useful log methods:
You can use these methods to write messages to the logs of your JSP/Servlet engine (they implement it all differently). For example, the following JSP
logged the following in my current log file catalina_log.2003-04-01.txt:
Look at the Tomcat category or documentation to see how you can change the file you want to log to.
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|