struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bridonneau" <ebridonn...@cariocas.com>
Subject RE: first action
Date Fri, 10 Jan 2003 19:18:06 GMT
Well, I suppose you do nothing more than what the specs states in most cases. Here's a snippet
of such a init webapp definition with two servlets ie. Struts controller and your init servlet.
Your initServlet can cache some app scope parameters or whatever else.
Enjoy.



-----Original Message-----
From: Yan Zhu [mailto:yan.zhu@infinity-insurance.com]
Sent: Thursday, January 09, 2003 6:55 PM
To: Emmanuel Bridonneau
Subject: Re: first action



great, thanks. how do you declare it in the web.xml?

Emmanuel Bridonneau wrote:

> You usually want to do this whilst initializing you app. In this case, simple and pretty
much standard would be to write a servlet (generic if you don't want to be tied to http) as
part of your web-app. All you do is implement its init() method and declare it in your web.xml.
Only once init is done for all your servlets, can the users hit your pages.
> Emmanuel
>
> -----Original Message-----
> From: Damm, Gary [mailto:garyd@qualcomm.com]
> Sent: Thursday, January 09, 2003 6:35 PM
> To: Struts Users Mailing List; yan.zhu@infinity-insurance.com
> Subject: RE: first action
>
> Sounds more like a PlugIn.  Here are the API docs:
> http://jakarta.apache.org/struts/api/org/apache/struts/action/PlugIn.htm
> l
>
> You just implement this interface, configure it in your config.xml file
> and you're up and running.
>
> Gary
>
> -----Original Message-----
> From: Yan Zhu [mailto:yan.zhu@infinity-insurance.com]
> Sent: Thursday, January 09, 2003 6:26 PM
> To: Struts Users Mailing List
> Subject: first action
>
> hey guys,
>
>     what is the best way to implement a startup action that always will
> be executed first before any jsp is hit?
>
>     thanks
>
> yan
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message