Topics Map > Application Hosting > Java/Tomcat
Topics Map > Service Documentation > Secure FTP

Web Hosting - Java/Tomcat - Developer Troubleshooting and Logs

This guide provides Java/Tomcat developers with best practices for logging, troubleshooting, and accessing Apache/Tomcat logs in the Web Hosting environment. Proper logging strategies are essential for diagnosing issues and maintaining application stability.

Best Practices

  • Plan your logging strategy during development and deployment and do not rely solely on default logging libraries.  Customize logging for your application’s requirements.
  • Log errors and warnings within your application rather than relying on Tomcat logs. Apache HTTP logs only indicate that an error occurred and do not provide application specific details.

  • Server-level logs, such as Catalina output, won’t include your application-specific logs.  We are not logging standard input and output into Catalina; this is your responsibility.

Handle Exceptions Properly:

  • Prevent uncaught exceptions from escaping your application.

  • Implement a top-level try-catch block for comprehensive error handling.

Adjust logging levels and Debugging

  • Increase logging levels based on environment e.g. Production logging for severe errors to trace issues not seen in development or testing.
  • Considering adding top level error handling code which can log errors and warnings to your web application logs as a more appropriate location than tomcat log.


Java customers have real-time access to Apache and Tomcat logs through two methods:

1. Plesk Log Viewer

  • Log in to the Plesk Control Panel for your domain.
  • Open Logs icon from the dashboard
    • View real-time logs and archives for:
      • Apache Access Logs
      • Apache Error Logs
    • A Custom log file can be added from your website directory to the log viewer. In the log manager select Manage Log Files --> Add Custom Log --> Select the file and click OK.

    • For example, navigate to tomcat/logs -> select something like catalina.out, manager.<date>.log, <appname>.log, localhost.<date>.log or localhost_access_log.<date>.txt

2. Secure FTP and SSH

  • Connect using your provided hostname, username, and password.
  • Navigate to the /logs folder.
  • Open the /tomcat folder.

3. Plesk File Manager

  • Log in to the Plesk Control Panel for your domain.
  • Open File Manager icon from the dashboard
  • Navigate to the /logs folder.
  • Open the /tomcat folder.
Resources

For questions or advice on Java/Tomcat logging strategies, contact the Web Hosting Team: webhosting@doit.wisc.edu



Keywords:
Logs, files, data, java, apache, weblogic, tomcat, access, catalina, catalina.out, localhost 
Doc ID:
35350
Owned by:
Jake S. in DoIT Web Hosting
Created:
2013-11-18
Updated:
2025-12-23
Sites:
DoIT Web Hosting