Use the correct method to get the request endpoint from the servlet engine.