struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jimmy Emmanual <jim...@imsi.com>
Subject RE: How to remove forms from session
Date Wed, 14 Jan 2004 12:22:50 GMT
try this:

if (mapping.getAttribute() != null) {
  if( "request".equals(mapping.getScope()) )
    request.removeAttribute(mapping.getAttribute());
  else
    session.removeAttribute(mapping.getAttribute());
}

-----Original Message-----
From: Brian Styles [mailto:givemeadamnusername@hotmail.com]
Sent: Wednesday, January 14, 2004 7:19 AM
To: struts-user@jakarta.apache.org
Subject: How to remove forms from session


Hi all,

sometimes I want to force remove form objects that are stored in session.
I was trying to do this by using the following code:

         HttpSession session = request.getSession(  );
         session.invalidate();

However, I've seen that this doesn't work and sometimes the object remains 
in session - and the information is available on the jsp once I go back to 
it.

So perhaps someone could tell me the correct way to remove form beans from 
the session object.
thanks very much,
Brian

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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

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


Mime
View raw message