Solved

Standart out for tomcat 4

Posted on 2002-03-12
6
182 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 1

Expert Comment

by:iartmirko
Comment Utility
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
Comment Utility
no prob, welcome to EE.

clo1: any feedback for us?
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
Comment Utility
PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now