Originally posted by Saif uddin:
so you mean to say session.removeAttribute() is more better choice instead using session.invalidate() method.
Invalidating the whole session in order to remove an attribute isn't just "not better", it's destructive and incorrect.
so where this method is useful?
That's a completely diffrernt question than this topic, so please start a new topic if you have questions about session invalidation.