• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tomcat 5 related question?

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Usually when we put 'System.out.println()' statements in a servlet... the Tomcat (version 4.x or version 3.x) or Catalina window will display the output... but when i tried to display a message using Tomcat version 5.x the Tomcat window doesn't display.

How can i make the output be shown on the Tomcat window? please, i need your guidance.

Thanks in adv...
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So your real problem is the tomcat 'window' not displaying, correct?

When you installed Tomcat5, did you install the service, and are you using the Tomcat service?

Any reason you're using system.out.println and not something like the log() method provided in the API (or better, log4j)?
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, i'm not using Tomcat as a service, but launching it manually.

I'm using System.out.println() methods for debugging the servlets...I can't get proper errors shown in the log files of tomcat.

regards
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, i forgot one more information... that is, the Tomcat is connected to Apache 2 server... will this be a problem to the tomcat window? I've also checked the log files in Apache...there is not enough information for my debugging.

 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so when you launch tomcat manually, there is no DOS Window?

That usually means Tomcat has not started at all (unless something has radically changed with TC5)
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,

I've both the DOS windows opened for Tomcat and apache... Both the TC and Apache are connected... The problem is I don't get the output on the DOS console of TomCat when a System.out.println() statement is executed by a Servlet.

 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in your server.xml file, do you have an attribute "swallowOutput=true" ?

If so, then System.out and System.err messages are redirected to the server log files. Those would be in $CATALINA_HOME/logs

Are there any messages in stdout.log or stderr.log (not *your* messages, but messages from Tomcat, indicating an error in startup?)
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've not used "swallowOutput=true" attribute inside any element within "server.xml" file. FYI, following list of text were written to "stdout.log" file...
=================================
12-May-2004 11:42:58 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
12-May-2004 11:42:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4887 ms
12-May-2004 11:42:59 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
12-May-2004 11:42:59 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.19
12-May-2004 11:42:59 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
12-May-2004 11:42:59 org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
12-May-2004 11:42:59 org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file :\Tomcat5.0\conf\Catalina\localhost\admin.xml
12-May-2004 11:43:01 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
12-May-2004 11:43:01 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
12-May-2004 11:43:03 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
12-May-2004 11:43:07 org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file :\Tomcat5.0\conf\Catalina\localhost\balancer.xml
12-May-2004 11:43:07 org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file :\Tomcat5.0\conf\Catalina\localhost\manager.xml
12-May-2004 11:43:08 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /jsp-examples from URL file :\Tomcat5.0\webapps\jsp-examples
12-May-2004 11:43:09 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path from URL file :\Tomcat5.0\webapps\ROOT
12-May-2004 11:43:09 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL file :\Tomcat5.0\webapps\servlets-examples
12-May-2004 11:43:09 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /tomcat-docs from URL file :\Tomcat5.0\webapps\tomcat-docs
12-May-2004 11:43:09 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webdav from URL file :\Tomcat5.0\webapps\webdav
12-May-2004 11:43:09 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
12-May-2004 11:43:10 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
12-May-2004 11:43:10 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/200 config=d:\Tomcat5.0\conf\jk2.properties
12-May-2004 11:43:10 org.apache.catalina.startup.Catalina start
INFO: Server startup in 11807 ms
12-May-2004 11:45:12 org.apache.coyote.http11.Http11Protocol pause
INFO: http11protocol.pause
12-May-2004 11:45:12 org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 0
12-May-2004 11:45:13 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
12-May-2004 11:45:13 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /admin
12-May-2004 11:45:13 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,path=/admin,host=localhost
12-May-2004 11:45:13 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /webdav
12-May-2004 11:45:13 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /servlets-examples
12-May-2004 11:45:13 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /jsp-examples
12-May-2004 11:45:14 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /balancer
12-May-2004 11:45:14 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /tomcat-docs
12-May-2004 11:45:14 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path
12-May-2004 11:45:14 org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /manager
12-May-2004 11:45:14 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,host=localhost
12-May-2004 11:45:14 org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger
12-May-2004 11:45:14 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stoping http11 protocol on 8080 Catalina:type=ThreadPool,name=http8080
===================================

regards
 
What's that smell? Hey, sniff this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic