Well, if you're doing web server stuff
you should learn about log handling.
Log4J probably.
Failing that I suppose you could try Sys.out, but I would have no idea where that would end up...probably the server logs somewhere.
Also, could you post the actual code and not images?
In code tags.
It helps when trying to follow these things and, unlike images, they won't disappear when writing a post.