I have a conundrum.
While trying to retain backward compatibility, I'm encountering an initial difficulty.Â
In order to calculate the values for `http.service.endpoint` I need to get all the mappings of the proxy servlet.
However, the only "spec" way of doing that is by calling:
String servletName = config.getServletName();
ServletRegistration servletRegistration = hostServletContext.getServletRegistration(servletName);
Collection<String> mappings = servletRegistration.getMappings();
However, while I can proxy the hostServletContext and avoid the "no such method" issue for `getServletRegistration`, the return type is the real problem.
In fact, if we can't calculate the proxy servlet mappings this way, we can't advance without at least one endpoint value since this is required.
How should we deal with that scenario?
1) fail without mercy?
2) expect some user value (init-param or config) we'll retrieve (which might be wrong)
If we do 1) we might as well just call the new method and fail in Servlet <3.0 containers
If we do 2) we allow a http-service which can potentially return inaccurate endpoint info.