Refactor request processor initialisation

Avoid code duplication between servlet and filter.