Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Standart out for tomcat 4

Posted on 2002-03-12
6
Medium Priority
?
228 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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

963 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