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..

can i show the java out puts(System.out.println) on the browser that is issude from java classes, not from the jsp pages.

Yes, you will have to read the log file and display the content in a JSP.

i think there may be a way to change the configuration in the tomcat server..

No, there isn't a way of doing this automagically.

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

thanks very much for your help..

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).

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.