There is one extra reason in favour of doing in the action: it's
really simple. Sure.

You can implement ServletRequestAware, an call
request.getSession().invalidate();

Alvaro.

On 9/13/07, Chris Pratt <[EMAIL PROTECTED]> wrote:
> On 9/12/07, Gabriel Belingueres <[EMAIL PROTECTED]> wrote:
> > I agree too that (generally speaking) we must introduce the least
> > possible quantity of scripting into JSP pages as we can, so we honor
> > the MVC architecture, however, in this particular case (invalidating
> > the session), I don't understand why would be better to do it in the
> > action class rather than in the JSP page for non-small apps.
>
> In my view, it's a maintainability issue.  If you keep all of your
> code in the .java files, except for one or two lines that are in
> scriplets, it becomes a nightmare for anyone else to maintain the
> code.  They would never think to look in the .jsp files for Java code,
> because that's not where the logic lives and it slows down the whole
> process of maintaining the site, or bringing people up to speed to
> maintain the site, so you can go off and do the fun things.
>
> On a related note, I think SessionAware should be updated to return a
> SessionMap (which is a subclass of Map, so shouldn't require any
> recoding of existing apps) so that type-casting isn't required to
> invalidate the session.
>   (*Chris*)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
[EMAIL PROTECTED]

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

Reply via email to