Solved

How do I do logging in JSP?

Posted on 2002-07-12
4
329 Views
Last Modified: 2010-04-01
Hello,

Is there support for logging in JSP's, and their associated beans (non-ejb beans)...examples?

Thanks,
Keith

0
Comment
Question by:keithedward
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 50 total points
ID: 7149275
you want to have logging for errors etc?

there is a great API: Log4J that is good for this or if you are using JDK 1.4 it has a Logging API built in.

http://jakarta.apache.org/log4j/docs/
http://www.javaworld.com/javaworld/jw-11-2000/jw-1122-log4j.html

http://java.sun.com/j2se/1.4/docs/guide/util/logging/
http://www.onjava.com/lpt/a//onjava/2002/06/19/log.html

CJ
0
 
LVL 1

Expert Comment

by:filipecorreia
ID: 7173859

  Hi,

If tou're using TomCat there's a directory called logs and inside it there are 2 files called stdout.log and
stderr.log
You can use this built in mecanism by printing to System.out or System.err
I agree that maybe this is not the best solution but it's certainly the easiest to implement ;)

Even if you're not using TomCat I'm pretty sure there is some logging system built in whatever servlet/JSP engine you might be using.

    Cheers

       Filipe
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9560861
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

"Accept cheekycj's comment as answer."
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now