fixing some issues in controller and jsp.