I keep on saying that you can perform exactly the same with
LogoutAction, but keeping away code from JSP.

However, I agree that in very small apps is ok to do a little scripting.

Alvaro.

On 9/12/07, Gabriel Belingueres <[EMAIL PROTECTED]> wrote:
> I'm not a purist myself, so it may break the MVC model somewhere, but
> (at lest in the apps I coded) I didn't find any use case that forced
> my to invalidate the session into a Logout action class.
>
> In addition, I like to present messages like "Thank you <Your Name
> here>" and this information is usually in session scope, so
> invalidating the session in the action class would force me to
> transfer this information into request scope just for showing in the
> logout page.
>
> 2007/9/11, Ray Clough <[EMAIL PROTECTED]>:
> > The only thing "wrong" with it is that now you are putting application 
> > control logic in a jsp page, which is 'OK' for small apps, and is probably 
> > 'OK' in this particular instance if there are no complicating factors.  
> > However, for purists, it IS putting control logic in a jsp page, which 
> > purists do not view as 'OK' (speaking as a purist myself, while 
> > acknowledging this as a possible character flaw.).
> > - Ray Clough
> >
> >
> > > ----- Original Message -----
> > > From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <user@struts.apache.org>
> > > Subject: Re: How to invalidate a session in struts 2.0
> > > Date: Tue, 11 Sep 2007 16:16:41 -0300
> > >
> > >
> > > Personally, I use the good old
> > >
> > > <% session.invalidate(); %>
> > >
> > > as the last instruction of my logout.jsp page.
> > >
> > > AFAIK, to invalidate the session inside an action, you must downcast
> > > the session Map (from the SessionAware interface) to a SessionMap
> > > class, which seems little awkward to me.
> > >
> > > Besides, using session.invalidate() doesn't seems to me like an
> > > anti-pattern or something wrong.
> > >
> > > Gabriel
> > >
> > > 2007/9/11, illusion <[EMAIL PROTECTED]>:
> > > >
> > > > Hey,
> > > >
> > > > How to invalidate a Http Sesssion in struts 2.0?  There is a SessionMap
> > > > class which asks for a httpservletrequest as a parameter, and has an
> > > > invalidate method for the http session, not sure how this works.
> > > >
> > > > thanks in advance for your assistance
> > > > --
> > > > View this message in context:
> > > > http://www.nabble.com/How-to-invalidate-a-session-in-struts-2.0-tf4424331.html#a12620475
> > > > Sent from the Struts - User mailing list archive at Nabble.com.
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > >
> >
> >
> >
> > - Ray Clough
> > [EMAIL PROTECTED]
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> 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