Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat System.out from a Thread

 
Kris Moens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe when you create the thread you could pass it a reference to System.out ?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or, the ServletContext, from which you can call .log()

if this is a JSP page, then use the 'application' object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic