struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: intercept return, and Interceptor implementing ServletRequestAware
Date Mon, 16 Apr 2007 01:53:07 GMT
--- Mansour <> 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:

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


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message