---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message -----
From: "loredana loredana" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Monday, November 05, 2007 10:32 AM
Subject: running! a servlet at tomcat startup
This issue is a classic one already I think. I've googled it and haven't
found anything that could help solving this problem. I'm probably not the
one to think about this but...if you would add the
<load-on-startup>1</load-on-startup> to a servlet, and from the init()
method you would somehow try to call the doGet() method, wouldn't that do
it? wouldn't that run the servlet at startup? did anybody try this already?
I am trying to do this but I'm having some problem creating
HttpServletRequest and Response objects so I can call doGet(). So if anyone
did this already, pls let me know how this issue can be fixed! 10x a lot!
=======================
Hi loredana,
Not sure if you asking or answering ;)
Yes, <load-on-startup> and then do stuff in the INIT method.
No, why try call doGet().... just init the functions that need initing, like
the dBPool, or image processing.
The doGet implies you want to return info to a browser.... there isnt one?
The Init method runs just once.... thats the idea.
<load-on-startup> just lets you get the INIT out of the way, otherwise it
will happen on the first browser request, and if it takes a long time the
browser will seem very slow to the user... but that only happens once
anyway.
????????
========================
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]