I am just curious to know, what happens when System.out.print() is called in a servlet? Where does it write the text?
Or is there any significant use of System.out in a servlet?
It depends on your servlet container.
For Tomcat :
When running Tomcat on unixes, the console output is usually redirected to the file named catalina.out. The name is configurable using an environment variable. (See the startup scripts). Whatever is written to System.err/out will be caught into that file.
For jetty, you can redirect standard output to a file :
It is possible to redirect all output sent to stderr and stdout to a file that can be rolled over [...]
2.1m questions
2.1m answers
60 comments
57.0k users