There's a few options, and each one depends on what you mean by 'startup', and unfortunately, what the particular container means by 'startup'.
in web.xml, you can specify that a
servlet will 'load-on-startup' and any value greater than 1 will cause Tomcat to load the servlet (run the init method) before even a first request is made.
Another option is (if you're using the most recent spec) to use ContextListeners. This is a class you register (also in web.xml I think) to listen to events like ContextCreated or ContextDestroyed.
More info on these can be found in both the servlet specification, and Tomcat's own docs.