Solved

Standart out for tomcat 4

Posted on 2002-03-12
6
220 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
[X]
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
  • 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

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…

734 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