There are many ways to do this.  Perhaps the most standard way is to
register one or more javax.servlet.ServletContextListener objects in
your web.xml.
Details here:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContextListener.html

Alternatively, if your initialization logic requires that Tapestry
already be initialized, you can plug into Tapestry's initialization by
contributing to the tapestry.init.ApplicationInitializers configuration
point.
e.g.
  <service-point id="MyInitializer"
interface="org.apache.tapestry.services.ApplicationInitializer">
    <invoke-factory>
      <construct class="class-name-of-your-initializer"></construct>
    </invoke-factory>
  </service-point>
 
  <contribution configuration-id="tapestry.init.ApplicationInitializers">
    <command id="MyInitializer" object="service:MyInitializer" after="*"/>
  </contribution>

Make sure that you've configured your Tapestry servlet to
load-on-startup in your web.xml.

Paul

Wayland Chan wrote:
> Struts has a Plugin interface that you can implement which allows you
> to do some initialization of the webapp once it's deployed on a server
> to alleviate startup time on first request.
>
> Does Tapestry have anything similar? My Tap4+Spring+Hibernate
> application takes almost a full minute to bring up the Home page after
> it's been deployed.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to