So Your Tomcat Home Page is Blank

This post may benefit 2 people in the entire world, but hey, it’s all in the course of a workday. Here’s what to do if your Tomcat home page is blank but otherwise fully functional. This will be quick and I could tell you the fix right now, but then you’d miss the illustrations.

I was hammering my development Tomcat server pretty hard, playing around with firing up a WAR from the command line. In the process I was creating links in my Tomcat /webapps directory to various temporary websites for testing and may have used the delete command on more than one occasion. (That’s a clue.)

Later in the day I noticed this. The page was not left intentionally blank…

I stopped and restarted Tomcat. Still nothing.

First place I checked was my catalina.log, of course.

127.0.0.1 - - [26/Mar/2015:16:29:28 -0400] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2015:16:39:55 -0400] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2015:16:40:15 -0400] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2015:16:40:16 -0400] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [26/Mar/2015:16:40:17 -0400] "GET / HTTP/1.1" 404 -

Ahhh, okay. That’s a start, but what wasn’t it finding? A quick view of the Tomcat /webapps folder was next.

When you see it…

That’s right. Somehow I had trashed my ROOT folder. The ROOT folder is where Tomcat’s home page is located. Fortunately I could swivel my office chair to the right and grab the ROOT folder on my Ubuntu machine for transfer to my development Linux Mint PC via Dropbox. I believe in having duplicates of everything when it comes to my work.

A Tomcat restart later and…

YES!

To be honest, we don’t NEED a Tomcat home page, but respect needs to be given, and because the Tomcat home page is cool…and leads to a better life.