need immediate solution

Sir,

i am using the session variable for accessing particular jsp page.

i am not able to destroy the session variable

i have used

session.removeAttribute("variable");

but once i press the link, the variable is gettig destroyed but.

when i again enter with as another user, the session is not getting included.

thank u

vinitha

[381 byte] By [Vinitha.Vijayana] at [2007-10-2 11:51:32]
# 1

>but once i press the link, the variable is gettig destroyed but.

>when i again enter with as another user, the session is not getting included.

Which Link ?

if the Link is Logout,

first use session.invalidate();

and forward him to Login page.

i think ur session.removeAttribute("name"); is not in proper place ;)

send the code , if possible

AE

actionPerformeda at 2007-7-13 6:25:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You can use this code it will work fine with every logout code

Enumuration enum = session.getAttributeNames();

if(enum.hasNext()){

session.removeAttribute(enum);

}

session.invalidate();

Plz check the spelling. For furthur problem let me know.

Thanks and Regards

Rajib Sharma

rajib2K5a at 2007-7-13 6:25:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...