Automatically instantiate Servlet

2003-11-18 Thread ambiesense
Hi,

usually Tomcat Servlets are instanciated after a webapplication is accessing
its url first time. Is there a method of automatically do this? Can I tell
Tomcat to instanciate a servlet directly after startup using a config file
(web.xml, server.xml)?

If the answer is yes, can anybody provide an example?

Cheers,
Ralf

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automatically instantiate Servlet

2003-11-18 Thread Christopher Schultz
Ralf,

 Can I tell
Tomcat to instanciate a servlet directly after startup using a config file
(web.xml, server.xml)?
  servlet
servlet-nameyourServlet/servlet-name
servlet-classyourClass/servlet-class
load-on-startup1/load-on-startup
  /servlet
-chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Automatically instantiate Servlet

2003-11-18 Thread Andreas Mohrig
Ralf,

web.xml is the right place. You just have to put another entry in your
desired servlet.../servlet section:

  servlet
  [...]
  load-on-startup1/load-on-startup
  /servlet

The number specified determines the order the servlets are instantiated at
startup (if you instantiante more than one).

Greetings

Andreas Mohrig

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 5:00 PM
To: [EMAIL PROTECTED]
Subject: Automatically instantiate Servlet


Hi,

usually Tomcat Servlets are instanciated after a webapplication is accessing
its url first time. Is there a method of automatically do this? Can I tell
Tomcat to instanciate a servlet directly after startup using a config file
(web.xml, server.xml)?

If the answer is yes, can anybody provide an example?

Cheers,
Ralf

-- 
NEU FUR ALLE - GMX MediaCenter - fur Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gru?, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse fur Mail, Message, More! +++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Automatically instantiate Servlet

2003-11-18 Thread Andoni
Check out the load-on-startup tag in we.xml.

The documentation can explain it much better than I.

 servlet
  servlet-namemyServ/servlet-name
  servlet-classcom.myaddress.myapp.HelloServlet/servlet-class
  load-on-startup1/load-on-startup
 /servlet

Andoni.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 3:59 PM
Subject: Automatically instantiate Servlet


 Hi,

 usually Tomcat Servlets are instanciated after a webapplication is
accessing
 its url first time. Is there a method of automatically do this? Can I tell
 Tomcat to instanciate a servlet directly after startup using a config file
 (web.xml, server.xml)?

 If the answer is yes, can anybody provide an example?

 Cheers,
 Ralf

 --
 NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
 Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

 Jetzt kostenlos anmelden unter http://www.gmx.net

 +++ GMX - die erste Adresse für Mail, Message, More! +++


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automatically instantiate Servlet

2003-11-18 Thread ambiesense
Hi, 

thank you very much. It works. What do the 1 mean? Is it just a binary
value 

0 = off 
1 = on

??

Cheers,
Ralf

 Ralf,
 
   Can I tell
  Tomcat to instanciate a servlet directly after startup using a config
 file
  (web.xml, server.xml)?
 
servlet
  servlet-nameyourServlet/servlet-name
  servlet-classyourClass/servlet-class
  load-on-startup1/load-on-startup
/servlet
 
 -chris
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automatically instantiate Servlet

2003-11-18 Thread Andoni
The one is the order in which you want numbered servlets to start up.

Non-numbered servlets don't start until called.

Andoni.
- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 4:22 PM
Subject: Re: Automatically instantiate Servlet


 Hi,

 thank you very much. It works. What do the 1 mean? Is it just a binary
 value

 0 = off
 1 = on

 ??

 Cheers,
 Ralf

  Ralf,
 
Can I tell
   Tomcat to instanciate a servlet directly after startup using a config
  file
   (web.xml, server.xml)?
 
 servlet
   servlet-nameyourServlet/servlet-name
   servlet-classyourClass/servlet-class
   load-on-startup1/load-on-startup
 /servlet
 
  -chris
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 --
 NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
 Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

 Jetzt kostenlos anmelden unter http://www.gmx.net

 +++ GMX - die erste Adresse für Mail, Message, More! +++


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Automatically instantiate Servlet - solved :)

2003-11-18 Thread Ralf Bierig
Thank you very much!

 Ralf,
 
 web.xml is the right place. You just have to put another entry in your
 desired servlet.../servlet section:
 
   servlet
   [...]
   load-on-startup1/load-on-startup
   /servlet
 
 The number specified determines the order the servlets are instantiated at
 startup (if you instantiante more than one).
 
 Greetings
 
 Andreas Mohrig
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 5:00 PM
 To: [EMAIL PROTECTED]
 Subject: Automatically instantiate Servlet
 
 
 Hi,
 
 usually Tomcat Servlets are instanciated after a webapplication is
 accessing
 its url first time. Is there a method of automatically do this? Can I tell
 Tomcat to instanciate a servlet directly after startup using a config file
 (web.xml, server.xml)?
 
 If the answer is yes, can anybody provide an example?
 
 Cheers,
 Ralf
 
 -- 
 NEU FUR ALLE - GMX MediaCenter - fur Fotos, Musik, Dateien...
 Fotoalbum, File Sharing, MMS, Multimedia-Gru?, GMX FotoService
 
 Jetzt kostenlos anmelden unter http://www.gmx.net
 
 +++ GMX - die erste Adresse fur Mail, Message, More! +++
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Automatically instantiate Servlet

2003-11-18 Thread Ralph Einfeldt

No, it's a numeric value giving the start priority 
to define the order if you have more than one servlet 
to start. (The servlets are started in ascending 
order of this value)

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 5:23 PM
 To: Tomcat Users List
 Subject: Re: Automatically instantiate Servlet

 What do the 1 mean? Is it just a binary value 
 
 0 = off 
 1 = on
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Automatically instantiate Servlet

2003-11-18 Thread Shapira, Yoav

Howdy,
Although be careful of depending on the order.  It's undefined if there
are multiple servlets with the same load-on-startup number, and
negative values are permissible as well.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 11:36 AM
To: Tomcat Users List
Subject: RE: Automatically instantiate Servlet


No, it's a numeric value giving the start priority
to define the order if you have more than one servlet
to start. (The servlets are started in ascending
order of this value)

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 5:23 PM
 To: Tomcat Users List
 Subject: Re: Automatically instantiate Servlet

 What do the 1 mean? Is it just a binary value

 0 = off
 1 = on


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Automatically instantiate Servlet

2003-11-18 Thread Ralph Einfeldt
Just one addition from the spec (2.4 pfd3):

'If the value is a negative integer, or the element 
is not present, the container is free to load the 
servlet whenever it chooses.'

So what I said (wrote) is just true from zero on.

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 5:40 PM
 To: Tomcat Users List
 Subject: RE: Automatically instantiate Servlet
 
 Although be careful of depending on the order.  It's 
 undefined if there are multiple servlets with the same 
 load-on-startup number, and
 negative values are permissible as well.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]