Solved

How do I do logging in JSP?

Posted on 2002-07-12
4
331 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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