Any way to Debug a servlet?

Hello !!I was wondering how can I debug a servlet? I have written a servlet, and I run it, and I just don't know where it goes wrong, or what happens. Is there a way to use the System.out.println function or something like that?Thank you !!
[262 byte] By [Sahabaa] at [2007-10-2 0:36:34]
# 1

Hello,

Have you checked the logs that your Servlet container keeps?

In case you want to write your own log how about create a file in servlet initialization and then write in it?

System.out.println will not work for a servlet unless you actually redirect System.out to a file

Hope this helps

virusakosa at 2007-7-15 16:51:12 > top of Java-index,Archived Forums,Debugging Tools and Techniques...
# 2
So where can I find the logs that my servlet container keeps?Forgive me, Im a pure newbie
Sahabaa at 2007-7-15 16:51:12 > top of Java-index,Archived Forums,Debugging Tools and Techniques...
# 3
Hello,There should be a log folder in your servlet container's home folder but check the documentation of your servlet container as well.Hope this helps
virusakosa at 2007-7-15 16:51:12 > top of Java-index,Archived Forums,Debugging Tools and Techniques...
# 4
General principle: if you need a debugger (rather than logfiles for example) to figure out what's wrong with your application you should revise your application design and implementation.
jwentinga at 2007-7-15 16:51:12 > top of Java-index,Archived Forums,Debugging Tools and Techniques...