TurnKey Linux Virtual Appliance Library

Console Output of Tomcat appliance

The Tomcat appliance is great, but I have a show stopper deploying my application.

In particular,  I'm having trouble debugging, because I can't find where the output of my webapp is going. As a test case, I tried writing to the standard output from a JSP, but it doesn't seem to get logged anywhere. 

 

 

<html>
<body>
<%
      System.out.println("JSP Running");
%>
Calculated value: <%= 10 + 20 %>
</body>
</html>

 

 

The JSP works just fine, but I can't find where the "JSP Running" message goes. It doesn't seem to go to any of the log files in  /usr/share/tomcat5.5/logs. Can you help me find where the console output is going?

BTW. Thanks for your great efforts. This appliance is great!

Found the Answer

Thanks, I've found that the output location is specified in the startup script /etc/init.d/tomcat5.5:

    $DAEMON -user "$TOMCAT5_USER" -cp "$JSVC_CLASSPATH" \
      -outfile SYSLOG -errfile SYSLOG \
      -pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"

And so the default Tomcat output is sent to /var/log/syslog (and can be viewed using Webmin).

Thanks again for great appliance.

Liraz Siri's picture

I'll update the documentation

Great that you figured it out. I was just about to look into your post. Alon did the integration for the Tomcat appliance so I didn't have the answer to your question on hand but now that you've come up with the solution yourself I've add a line to the documentation to simplify this for others.

Thanks for the feedback!

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)