Setting the Environment
Once you have followed the instructions in the "Installing Log
Tag Library" section, you are all ready to use the Log tag
library from within your JSP. Before you can see the example JSP
in Listing 1 in action, you need to configure your web server to
use your JSP and the log4j configuration file as described in the
next few points.
This is all you require to see the use of Log example in action.
The Log Example in Action
You can now start up your Tomcat and access the JSP page. Figure
1 presents a screenshot of the JSP.
Enlarge Picture
Figure 1: The JSP using the Log tag library
If you now look into the Tomcat console, you will see the logging
information getting printed.
DEBUG[Thread-11](LoggerTag.java:109)-Message embedded within open and
close tags.
DEBUG[Thread-11](LoggerTag.java:97)-Message passed as an attribute to
the tag
INFO[Thread-11](LoggerTag.java:109)-Using category attribute.
|
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.