Thursday, March 10, 2005

Tomcat Live CD Howto

Trying to find a way to demo a web application for a client and having unknown firewall and system configuration issues, I decided to create a "live" cd with Embedded Tomcat.

An outline of the tasks for this project are:

  • Download Embedded Tomcat

  • build a wrapper/launcher for tomcat

  • package my web application into a war file

  • write a batch file to launch the app

  • write an Autorun.inf file to auto run the cd

  • Copy the Java SDK to the CD

First download the Embedded Tomcat (

Next, create the project directories for the embedded server:

Copy all of the jars from the embedded tomcat download into the lib directory. Now, copy the war file for your project into the webapps directory (make sure your web app will run on Tomcat 5 first). Now you will need to write a Java class to get Tomcat started.

The Embedded Tomcat Launcher
The purpose of this item is to create a temporary work directory, create the engine, create a Context pointing to the war file, and start and stop the server.

Links to this post