Solved

How do I do logging in JSP?

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How To Remove a Principal from HttpServletRequest 4 52
squirrelPlay java challenge 40 158
eclipse buid path vs tomcat lib path 10 34
How  can  i  resolve  HTTP Status 404 -? 8 43
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 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