thank you very much Newton. The issue is resolved now! I was using model.addAttribute(position) instead of model.addAttribute("position", position). Because my model object is position but model class is MyPosition.
I guess, i need to write a toString() method in User class to display the contents properly.