rewriting servlet factory