Solved

Standart out for tomcat 4

Posted on 2002-03-12
6
225 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

627 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