Link to home
Start Free TrialLog in
Avatar of dipak_kr_ghosh
dipak_kr_ghosh

asked on

JavaWebServer Log

I am using JavaWebServer2.0 for deploying my servlets. For testing the code I have put System.out.println() and System.err.println() but the messages are not coming in the log files in the sub-directories of the logs folder of JavaWebServer2.0. Can anyone tell me as to where I should look for the messages or what should be the strategy for debugging.

regards.
Avatar of rainmal
rainmal

Don't use System.out to write to the server log
just call log() with your message.

For example
log("error");

This will log the message into the event log of the web server

you should generally override this function though.
ASKER CERTIFIED SOLUTION
Avatar of rainmal
rainmal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dipak_kr_ghosh

ASKER

Hi rainmal
 I tried out your first suggestion, but it did not work. Any way now I am writing all the necessary output to my own file than depending on the server for that.
well make sure you are looking for the log in your server event log .

For thr java web server , it logs in the event log which you read thru the server admin util...I'm pretty sure of that cause I've personally used it.