tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: tomcat startup processing
Date Fri, 22 Oct 2004 20:10:41 GMT


>is there away to have a jsp or something run some code on startup or to
>it cache some data results so that I dont have to keep on going to the
>database each time the page is loaded.

The best place for this is usually a ServletContextListener.
Alternatives including a static initializer block and a Servlet's init
method.  Try not to use approaches that are implementation specific like
the Struts one, because generic alternatives do exist and don't tie you
to a specific product.


This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message