Sunday, 15 May 2011

Standard Output from Tomcat 4.X console

I wrote some JSP application and place it under Tomcat 4.1 (since it doesn’t require Java 1.5 ). Inside JSP page I have a lot of


commands. Then you start Tomcat it opens another console window where you can see all standard output. But this output is being written to the console only. It is not stored in the file . So if you stopped Tomcat and want to check something about your JSP there is no way to do it. I found a way to redirect the output to the file anyway.

   Let say that your Tomcat installed c:\Tomcat4.1. Execute the following:

   1: cd c:\Tomcat4.1
   2: set CATALINA_HOME=%cd%
   3: cd bin
   4: catalina.bat run >> ..\logs\stdout.txt

After executing this steps your standard output file will be locate under c:\Tomcat4.1\logs\stdout.txt

No comments:

Post a Comment