--- Mansour <[EMAIL PROTECTED]> wrote:
> What's the point then of having an action, if the
> intercept method is going to execute the action. Why

> don't I just put the action code in an interceptor ?

Because interceptors are normally called for *groups*
of actions, not just one... just like it says in the
first couple of paragraphs at the top of:

http://struts.apache.org/2.x/docs/interceptors.html

For instance, "validation" is a cross-cutting concern.
So it makes sense to move it away from the code that
decides what to to with the validated data.

Of course you *could* put all your action code into an
interceptor and define an interceptor stack for every
action-that-no-longer-had-an-action. There are many
ways to make things harder--don't get me wrong, I
applaud your efforts to find them.

You could put all your action code into filters, then
you wouldn't even need servlets. Or put everything
inside a JSP, then you wouldn't even need to compile
or worry about whether or not your container
hot-deploys.

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to