Thanks Bhanu, your solutions works.
If scope is not mentioned then, is it not that all the scopes(session,application,page,request) are searched for that particular variable? please correct me if i am wrong. As there were no other variables with the same name in any other scope, i used directly ${var}.I didnt get why it didnt work for me.