tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edoardo Panfili <edoa...@aspix.it>
Subject Re: tomcat startup processing
Date Sat, 23 Oct 2004 06:12:31 GMT
Didier McGillis wrote:
> is there away to have a jsp or something run some code on startup or to 
> have it cache some data results so that I dont have to keep on going to 
> the database each time the page is loaded.

I use some cached informations on my application, the information are stored
as static in a class, I put this configuration on web.xml

	<servlet>
		<servlet-name>ServerInit</servlet-name>
		<servlet-class>youtPackage.ServerInit</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

an the class is loaded ad startup.
After startup I can find cached information using ServerInit.yourMethod()

edoardo

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message