I have a simple servlet that creates HTML with PrintWriter and writes to console via System.out.prinln() in the same doGet() method.
servlet
System.out.prinln()
How to Log out to console: Right click on your glassfish and go to View Log File Make sure the console setting is directed at your server.log file: