Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A question about printing data to the Tomcat console

843842Apr 7 2009 — edited Apr 11 2009
Dear all,

Currently I'm reading a very interesting book "Murach's Java Servlets and JSP" in order to start learning about Servlets and in general Web programming with JEE (I'm really a beginner in this domain). At the page 194 the author says:

>
...
When you use System.out.println statement to print debugging data to the console, this data may be printed to different locations depending on your development environment, If, for example, you're using Netbeans IDE, the data will be printed to the Tomcat tab of the Output window. However, if you're using Tomcat in stand-alone environment, the data will be printed to a Tomcat console
>

My working environment is:
OS: Linux (ubuntu 8.10)
IDE: Netbeans 6.5.1
Server: Apache Tomcat 6.0.18

In order to start the server I run in the Linux terminal
mysession#  $CATALINA_HOME/bin/startup.sh
And then I run Netbeans in order to open and work with my web project. Now my problem is that I put a System.out.println() statement in my Servlet file in order to see how the information is printed in the console, but it didn't print anything. I have the following questions


1) Where is exactly the Tomcat console? in the browser?

2) Is there any Tomcat tab in Netbeans output window as it is said in the book? because I didn't find anything and when I run my project I see in the output window the following:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Incrementally deploying http://localhost:8080/WebApplication1
Completed incremental distribution of http://localhost:8080/WebApplication1
run-deploy:
Browsing: http://localhost:8080/WebApplication1/form1.html
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 0 seconds)
3) Why I cannot see the output of the System.out.println(), Am I missing something? I mean, where the output is printed (if it is actually printed) I also tried to open the IDE log tab in Netbeans which contained the following message:
...
WARNING [global]: Error in source for css properties model for property: z-index
INFO [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: DebuggerInfo cannot be found for: Apache Tomcat 6.0.18
Any idea?

Thanks in advance,
:)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2009
Added on Apr 7 2009
6 comments
1,069 views