• Post Reply Bookmark Topic Watch Topic
  • New Topic

command window disappear  RSS feed

 
Sophia Choi
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How can the command window be shown after starting the Tomcat server as I want to see the System.out.println ?
Thanks
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what a "command window" is, but you can always do this:
tail -f logs/catalina.out
to see the log messages scroll by as they are generated. You must first cd to the Tomcat home directory.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you start Tomcat as a service you don't get a window. If you start it by executing startup.bat you should get a command window automatically.
Being able to see the System.out output is very handy so I always start my server that way.
Bill
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does that mean, "start it as a service"?
When I run startup.sh, I don't get any kind of new window. It just prints this:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr
and then gives me a new shell prompt. If I want to see the output, I have to tail the file logs/catalina.out . Is there a better way?
 
Sloan Bowman
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He is talking about running tomcat on Windows and getting a Command window that stays open. In UNIX/Linux etc. the process is forked into the background.
Originally posted by Ron Newman:
What does that mean, "start it as a service"?
When I run startup.sh, I don't get any kind of new window. It just prints this:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr
and then gives me a new shell prompt. If I want to see the output, I have to tail the file logs/catalina.out . Is there a better way?
 
Sophia Choi
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for your replying.
I set tomcat's service in manual mode. Although the command window shows up, my 'System.out.println' is written in the log, not in the window.
How can I fix it ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!