break servlet-api methods into separate util to allow optional exclusion of servlet-api dependency without causing classloading exceptions for the rest.