struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett <br...@interaccion.es>
Subject RE: Executing code before each action
Date Tue, 10 Sep 2002 17:40:29 GMT
If I understand servlet filters correctly you mean I could simply set /* to go to my filter
and then perform the steps I need in the filter.  Does it then pass the request onto the Action
as per normal?  I assume it does.


At 10:25 10/09/2002 -0700, you wrote:
>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>


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