Q:

how do i add a custom startup class to tomcat?

I need to tweak some things inside Tomcat 6.0 before any web applications or listeners are started.  What's the standard method for doing this?  I can't do this from a web application or servlet init() since it is too late by the time it is loaded.

A:

Creating a custom LifecycleListener is probably the right way of doing this. See the Tomcat configuration guide for more details; the lifecycle listeners can be added to most containers.

