change file servlet into a proper resource