?
Solved

How do I do logging in JSP?

Posted on 2002-07-12
4
Medium Priority
?
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

765 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