added printwriter method to like servlet