Well, turns out that dropping bodington.war into the Tomcat server does work without a hitch if you do the dropping from within the Tomcat Manager application. I just upgraded this morning from Tomcat 5.5 to Tomcat 6.0, and so I decided to try the “drop in” route for deploying Bodington.
It is still true that you have to add the database driver libraries under WEB-INF /lib in order to get your chosen database to be visible to the setup screen. So the rules are:
- use Tomcat manager to deploy bodington.war
- copy your db jar files to bodington/WEB-INF/lib/. Or as Matthew pointed out in the comments, your Tomcat install may already have the proper db library jar files located in $CATALINA_HOME/lib.
- use Tomcat manager to restart bodington, if you added db jar files to the web app.
- log in as sysadmin (read the bodington/WEB-INF/adminpw.txt file for the password)
- follow the configuration dialogs
- when you’re up and running, delete the adminpw.txt file, or make it invisible to the world or something.
You can always drop the database JARs into shared/lib or if you are thinking about using a database connection pool provided by tomcat commons/lib. Which means you don’t lose the JARs on Bodington upgrade.
Comment by Matthew Buckett — May 31, 2007 @ 5:49 am
Matthew, excellent point. In Gentoo, which uses a non-Tomcat-standard file layout, the best place probably would be under /usr/share/tomcat-6/lib/ which is where I dropped log4j.jar. I am in the habit of keeping all of my dependencies together with the application, because I usually build with Maven 2 and that’s what it does by default (unless you tell it that the container already has the library in question).
Comment by jmarca — May 31, 2007 @ 12:42 pm