Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Standart out for tomcat 4

Posted on 2002-03-12
6
209 Views
Last Modified: 2010-03-04
I would like to know how can I output the standard out from my servlet "System.out.println" to the screen or command prompt area instead of going to the cataline.out?

P.s. I am using the linux version of tomcat. Thanks
0
Comment
Question by:clo1
  • 3
  • 2
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6921637
if you tail the file.. you will see that.

All system.out.println's for tomcat goto a file for logging purposes.

If you:

tail -f cataline.out

you will see the output in realtime.

I am not sure about redirectint the output totally to the screen.

CJ
0
 
LVL 1

Expert Comment

by:iartmirko
ID: 6933288
Use the java.lang.System.setOut(PrintStream out) to set the outputstream of your choice.

By the way, don't use System.out.println() in your servlet. This will be a bottleneck because it is synchronized...use the log(String msg) method of GenericServlet (HttpServlets extends it) to log your messages.

Mirko

0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6933735
Mirko:  You shouldn't have proposed an answer.. what you gave was an option.. it is not the 110% absolute answer.  Please refer to the bottom of this page for an explanation on when to use comments vs answers.

CJ
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 1

Expert Comment

by:iartmirko
ID: 6943132
CJ,

excuse me, was my first comment on expert-exchange...haven't read the tips correctly...will use comments from now...

Thanks,

Mirko
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6945170
no prob, welcome to EE.

clo1: any feedback for us?
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8297317
PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Apache HTTP to HTTPS redirect please. 5 54
Xampp Not Stopping 9 42
Guacamole and browser performance 1 105
Need to redirect request from IIS server to old Apache Server. 3 144
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question