944,050 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 4450
  • JSP RSS
Jan 29th, 2007
0

how to show java out puts in web browser

Expand Post »
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..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
rpjanaka is offline Offline
69 posts
since Sep 2006
Jan 29th, 2007
0

Re: how to show java out puts in web browser

Click to Expand / Collapse  Quote originally posted by rpjanaka ...
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.

Quote ...
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.
Reputation Points: 48
Solved Threads: 7
Posting Whiz
aniseed is offline Offline
353 posts
since Apr 2006
Jan 29th, 2007
0

Re: how to show java out puts in web browser

Click to Expand / Collapse  Quote originally posted by rpjanaka ...
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
Last edited by peter_budo; Jan 29th, 2007 at 8:23 am.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004
Jan 29th, 2007
0

Re: how to show java out puts in web browser

thanks very much for your help..
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
rpjanaka is offline Offline
69 posts
since Sep 2006
Jan 29th, 2007
0

Re: how to show java out puts in web browser

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).
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Jan 29th, 2007
0

Re: how to show java out puts in web browser

Click to Expand / Collapse  Quote originally posted by masijade ...
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
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004
Jan 30th, 2007
0

Re: how to show java out puts in web browser

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.
Last edited by masijade; Jan 30th, 2007 at 2:53 am. Reason: typo
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: how work <jsp:setProperty….> tag internaly
Next Thread in JSP Forum Timeline: Problem adding registration data to mysql database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC