You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alan Wright <At...@btinternet.com> on 2000/12/13 12:28:36 UTC

stdout logging

Is it possible to force tomcat to redirect all stdout to a specified logfile
for any servlets/beans that are running under tomcat?

Thanks

Alan Wright


Re: stdout logging

Posted by Alan Wright <At...@btinternet.com>.
Same question but with more background (found text of unanswered query sent to
another newsgroup)

I am new to Java servlets and JSP so forgive me if the answer to these
questions seems obvious:

1) How should I go about redirecting System.out.println("") output to a
file for the Tomcat engine.  I have read about setting the System.out
property but am not clear about how or where to do this.  Should it be
in each class file that makes up the servlet/JSP application or should i
be looking at some Tomcat configuration option?

2)I have been using getServletContext.log("") to log within servlets but
am not able to do this in the javabean classes used by the servlets (at
least I don't know how to).  Is it possible to access the servlet
context logs within a "used" javabean? (This is why I ask question 1).

TIA

Alan Wright