struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trieu, Danny" <DTr...@downeysavings.com>
Subject RE: Executing code before each action
Date Tue, 10 Sep 2002 17:25:38 GMT
In short, what you are doing is templating your action classes.  This is
good if it is a core service to the action class.  Another alternative way
is to use servlet filter, this is good because your action class to not need
to know the default behavior, plus it doesn't need to since the action class
does not depend on it.

-----Original Message-----
From: Mark Silva [mailto:msilva@authenex.com] 
Sent: Tuesday, September 10, 2002 10:20 AM
To: Struts Users Mailing List
Subject: RE: Executing code before each action


you could sublass the Action Object (BaseAction), and provide this
functionality.  your Action classes will then subclass this object.  you may
need to rename your perform method and call that my you BaseAction class'
perform method.

-mark

-----Original Message-----
From: Brett [mailto:brett@interaccion.es]
Sent: Tuesday, September 10, 2002 10:17 AM
To: struts-user@jakarta.apache.org
Subject: Executing code before each action


Hello,

I have a piece of code than I need to execute before each action (it checks
which country the user is in the then sets a session variable).  I want to
execute this before each action so that if a user bookmarks a page and
returns without entering through the "front door" I still have the session
variable.  

What is the best way of doing this.  I have thought about using the
RequestProcesser but as I understood it that is for changing request
behaviour rather than this type of thing.

Thanks in advance.
Brett




--
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>

--
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