aspose file tools*
The moose likes Tomcat and the fly likes Tomcat System.out from a Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat System.out from a Thread" Watch "Tomcat System.out from a Thread" New topic
Author

Tomcat System.out from a Thread

Kris Moens
Greenhorn

Joined: Sep 18, 2003
Posts: 2
Hi everyone,
I'm running Tomcat 4.1.27 win2000.
Getting the System.out messages from a servlet in a logfile works fine.
But... if this servlet starts a new Thread, the System.out messages are
directed to the console and no longer to the webapp logfile as defined in
the server.xml ?!
Did anyone experienced the same problem and have some fixing for it ?
Thanx in advance
Kris
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
maybe when you create the thread you could pass it a reference to System.out ?


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

or, the ServletContext, from which you can call .log()

if this is a JSP page, then use the 'application' object.
 
 
subject: Tomcat System.out from a Thread