You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yan Zhu <ya...@ipacc.com> on 2003/08/20 14:17:36 UTC
about initalization
at what point during application load does Struts preform
its initalization? I need to insert an event right after that. How
could I make sure of that?
thanks
yan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: about initalization
Posted by Nicolas De Loof <ni...@cgey.com>.
in web.xml, struts controller servlet is set with a "load-on-startup" value.
You can configure another servlet in this file with a "load-on-startup" value greater that struts'one. This way your
servlet will load and configure after struts.
Another (better ?) way is to create a struts plugin that will start and stop with struts servlet and will be initialized
after struts has read it's configuration file.
Nico.
----- Original Message -----
From: "Yan Zhu" <ya...@ipacc.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, August 20, 2003 2:17 PM
Subject: about initalization
>
> at what point during application load does Struts preform
> its initalization? I need to insert an event right after that. How
> could I make sure of that?
>
> thanks
>
> yan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: about initalization
Posted by Jeff Kyser <kt...@comcast.net>.
How about adding an InitServlet to your app's web.xml file"
<servlet>
<servlet-name>initservlet</servlet-name>
<servlet-class>your.webapp.framework.InitServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
Then derive your InitServlet from HttpServlet:
public class InitServlet extends HttpServlet{
public void init() throws ServletException{
// call my super's init method
super.init();
//... custom initializations here
}
}
HTH,
-jeff
On Wednesday, August 20, 2003, at 07:17 AM, Yan Zhu wrote:
>
> at what point during application load does Struts preform
> its initalization? I need to insert an event right after that. How
> could I make sure of that?
>
> thanks
>
> yan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org