Tomcat 4.1 System.out

From: Michael Baran (mcbaran_at_cabm.rutgers.edu)
Date: 01/30/04


Date: 30 Jan 2004 14:26:58 -0800

Hi all,

I am upgrading from Tomcat 3.2.4 to 4.1.27.

Many of our servlets make system calls and rely on being able to suck
up the stdout of the programs the java was calling.

It seems in Tomcat 4 stdout is being rerouted somehow.

Does anyone know how to configure Tomcat so stdout can be captured
using something like this:

BufferedReader in = new BufferedReader( new
InputStreamReader(pro.getInputStream()));
StringBuffer output = new StringBuffer();
String line = "";
        while ((line=in.readLine()) != null)
        {
               output.append(line + "\n");
        }
        Result = output.toString();
              System.out.println(Result);
        pro.waitFor();



Relevant Pages

  • Re: tomcat log4j
    ... logging and my web application logging is send to stdout and the ... I would like that the loging of tomcat would not be output to stdout. ... log messages. ...
    (comp.lang.java.programmer)
  • Re: How to redirect stdout&stderr into files in Tomcat 4.1.29 on RedHat 9 ?
    ... Tomcat creates a file called catalina.out in %CATALINA_HOME%/logs/ this ... will give you the output of stdout as far as I am aware. ... But for debugging purposes it seems much better to use a logging ... component such as Jakarta Commons Logging ...
    (comp.lang.java.programmer)
  • Re: tomcat log4j
    ... servlet container. ... logging and my web application logging is send to stdout and the ... I would like that the loging of tomcat would not be output to stdout. ...
    (comp.lang.java.programmer)
  • tomcat log4j
    ... I use log4j for logging in my java web application. ... servlet container. ... The problem is that both the output of Tomcat ... I would like that the loging of tomcat would not be output to stdout. ...
    (comp.lang.java.programmer)
  • Re: A string composed of a character repeated x number of times
    ... I understand the need for StringBuffer and StringBuilder classes. ... The function/method/constructor I am looking is helpful in situations ... where you want to format output on the stdout. ...
    (comp.lang.java.programmer)