how to show java out puts in web browser

Reply

Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

how to show java out puts in web browser

 
0
  #1
Jan 29th, 2007
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..
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 353
Reputation: aniseed is an unknown quantity at this point 
Solved Threads: 6
aniseed's Avatar
aniseed aniseed is offline Offline
Posting Whiz

Re: how to show java out puts in web browser

 
0
  #2
Jan 29th, 2007
Originally Posted by rpjanaka View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,273
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 494
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to show java out puts in web browser

 
0
  #3
Jan 29th, 2007
Originally Posted by rpjanaka View 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..
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.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Re: how to show java out puts in web browser

 
0
  #4
Jan 29th, 2007
thanks very much for your help..
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: how to show java out puts in web browser

 
0
  #5
Jan 29th, 2007
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).
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,273
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 494
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to show java out puts in web browser

 
0
  #6
Jan 29th, 2007
Originally Posted by masijade View Post
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
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: how to show java out puts in web browser

 
0
  #7
Jan 30th, 2007
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
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 3579 | Replies: 6
Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC