O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Log4J

You will want to generate log messages, both for debugging and to report state during the operation of the Web site. You should standardize this, too; otherwise, everyone will end up placing System.out.printlns all over the code, and you'll have a nightmare of a time cleaning them up later. The Apache folks have a nifty little (actually, fairly robust) logging package called Log4J (that's log for Java, get it?)

Log4J is easy to use but a bit tricky to configure. In the examples throughout the book, you will be using it in a fairly simple fashion, but it's worth taking about its full capabilities.

After installing Log4J using the instructions in Appendix C,you need to configure it for your application, just as Turbine needed to be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required