Yes ... 

-----Original Message-----
From: Brett [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 10:40 AM
To: Struts Users Mailing List
Subject: RE: Executing code before each action


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:[EMAIL PROTECTED]]
>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:[EMAIL PROTECTED]]
>Sent: Tuesday, September 10, 2002 10:17 AM
>To: [EMAIL PROTECTED]
>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:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail: 
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to