It might be nice to add a type hint or precondition here that checks the type of `servlet-context`; it will make it easier for developers to understand what's going on.