struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Clough" <...@allthisisthat.com>
Subject Re: How to invalidate a session in struts 2.0
Date Tue, 11 Sep 2007 20:12:58 GMT
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" <belingueres@gmail.com>
> 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 <sanjay_sss@hotmail.com>:
> >
> > 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

>



- Ray Clough
ray@allthisisthat.com



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message