I don't believe there is an option to do this. You have to add your own
startup servlet. Which is probably fine since you're likely going to be
performing tasks that are session/request independent at that time anyway.
Any resulting objects you create could be put on the ServletContext.

For an example, look at the
org.apache.struts.webapp.example.DatabaseServlet.java from the example
application. Make sure you have an entry in the web.xml similar to the one
the sample has for this DatabaseServlet.

This would be a good feature to add, though.

The primary Action servlet could parse the struts-config.xml looking for
startup actions. These could subclass a StartUpAction class.

something like:

<StartUpActions>
     <StartUpAction name="com.my.package.MyStartupClass" />
</StartUpActions>










Gary Bartlett <[EMAIL PROTECTED]> on 05/03/2002 11:22:14 AM

Please respond to "Struts Users Mailing List"
      <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  Can Struts initialize my services at Startup ?


Question -

Can I configure Struts to make a call to my
application services at Servlet init() time ?

I  browsed around the docs and the mail archive - but
didn't see if this was available.

Thanks,

Gary Bartlett

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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







---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------


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

Reply via email to