7 Replies Latest reply on Jul 3, 2007 4:59 PM by cf_dev2

    Getting java "System.out.println" content in a CF template

    Winter999
      All,
      I'm a newbie to CF/JAVA integration and inherited about 20 java applications that are being called from a CF template. Smattered throughout the java code (hundreds of places) there is System.out.println() statements. So far I haven't been able to get this output back to display on the web page.

      CF Code:

      <CFSET UploadName = UploadsDir & "\" & cffile.serverFile>
      <CFSET ExceptionName = UploadsDir & "\" & ExPrefix & BaseName>
      <cfobject type="java" name="UploadObject" class="UploadProgram" action="create">
      <cfset params = ArrayNew(1)>
      <cfset params[1] = UploadName>
      <cfset params[2] = ExceptionName>
      #UploadObject.main(params)#

      Java snippet:

      System.out.println("");
      System.out.println(recCount+" input records");
      System.out.println(hdrCount+" header");
      System.out.println(accCount+" good");
      System.out.println(errCount+" bad");
      System.out.println(ignCount+" ignored");
      System.out.println("");
      System.out.flush();

      All help will be appreciated. Thanks!