how to show java out puts in web browser
hi all,
i am using the tomcat server..
can i show the java out puts(System.out.println) on the browser that is issude from java classes, not from the jsp pages.
i think there may be a way to change the configuration in the tomcat server..
thanks..
rpjanaka
Junior Poster in Training
69 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
hi all,
i am using the tomcat server..
can i show the java out puts(System.out.println) on the browser that is issude from java classes, not from the jsp pages.
i think there may be a way to change the configuration in the tomcat server..
thanks..
I think you looking to debug your code by way of using System.out.println. Yes you can do that, but you need to run tomcat in "command propmt" ( I don't know proper name for it) but you can find it in your tomcat folder under bin there is file called tomcat5.exe( like C:\Tomcat5.5\bin\tomcat5.exe). This will triger start of Tomcat in comand prompt view, use browser to run your jsp's and check System.out.println's in tomcat command propmt view
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
thanks very much for your help..
rpjanaka
Junior Poster in Training
69 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
No, you don't need to. Anything you print to System.out will show up in the catalina.out logfile (as long as you have that activated).
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
No, you don't need to. Anything you print to System.out will show up in the catalina.out logfile (as long as you have that activated).
LOL, always funn to search log file, personaly I do it as writen above your post :p
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
It's extremely easy. Prepend every String that you print through System.out.println with "DEBUG: " then simply grep out that word. Presto, there's your output, no fuss, no muss, no searching, and no special startup procedure. Simply rotate the log before you start tomcat (which you probably should be doing anyway, if you're debugging) and everything is cool.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494