It obviously throws NullPointerException, because you check if session is null, if its null, then you call session.setAttribute, perhaps you forgot to assign session in above line, i.e request.getSession(true), it should have been session = request.getSession(true)
Joined: Aug 20, 2011
okay, working now....thanks...
one more thing i want to know, when my session gets expired...
what i was expecting is, when i close my browser my session gets expired, apart from browser even when i m stopping my server my session is not expiring...