Write and flush when error
A class to keep servlet req/resp