Java servlet for creating thumbnail on the fly