tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: how to do the initial process
Date Wed, 20 Sep 2000 09:42:50 GMT


> -----Original Message-----
> From:	wang zhongdong [SMTP:zhongdong-wang@togem.kawatetsu.ne.jp]
> Sent:	Wednesday, September 20, 2000 4:13 AM
> To:	'tomcat-user@jakarta.apache.org'
> Subject:	how to do the initial process
> 
> Hello, I need to do some initial process during(after) the Tomcat startup.
> 
> Such as load the login servlet so the init() of the login servlet will be 
> exec . Because it will be too late when a client first accesses the login 
> servlet(for some special logic in the init()). How can I do? There seems
> to 
> be no method to load the login servlet during the Tomcat startup. Maybe I 
> should write a Java Application to request the login servlet after the 
> Tomcat startup, but I don't know whether it is the right way and how to do
> 
> it.
> 
> Thank you very much for your help!
> 
> Wang
> mailto: zhongdong-wang@togem.kawatetsu.ne.jp
> 
	[Kitching Simon]  
	No problem, just add a load-on-startup entry to your
	servlet tag in your webapp's WEB-INF/web.xml file.

	<servlet>
	  <servlet-name>initializerServlet</servlet-name>
	    <servlet-class>com.xyz.InitializerServlet</servlet-class>
	    <load-on-startup>1</load-on-startup>

	    <init-param>
	      <param-name>param1</param-name>
	      <param-value>value1</param-value>
	    </init-param>
	</servlet>

	Regards,

	Simon
>  
> 
> 

Mime
View raw message