Hey,
Write a servlet that does this.
Extend
javax.servlet.http.HttpServlet
override the "init" method.
in this init method, do whatever it is you're doing.
In web.xml, declare this servlet like usual and put in a load-on-startup
tag.
<servlet>
<servlet-name>DataInitServlet</servlet-name>
<servlet-class>com.xxx.memphis.util.DataInitServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
The number in load on startup indicates in what order to load them -- if I
recall correctly, lower numbers go first.
cheers
fillup
On 6/6/02 2:53 AM, "Aline" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can anyone tell me how to create an object instance and put it in the
> servlet context at the beginning of a web application.
>
> Is it in the web.xml that I must declare it?
>
> thanks.
> Aline
> Webcaster
> T +33 (0)3 28 36 25 23
> F +33 (0)3 20 13 06 04
> http://www.oeilpouroeil.fr
> http://www.visiodrome.com
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>