From the doc: Using standard configurations of Tomcat, web applications can ask for the server name and port number to which the request was directed for processing. When Tomcat is running standalone with the Coyote HTTP/1.1 Connector, it will generally report the server name specified in the request, and the port number on which the Connector is listening. The two servlet API calls of interest, for this purpose, are: * ServletRequest.getServerName() * ServletRequest.getServerPort() "and the port number on which the Connector is listening" - NOT TRUE. When proxyPort is not specified, getServerPort() gives the port number which is on the client side request - not the real one on which the Connector is listening. Please correct doc.
I've updated and clarified the documentation per your request. Thank you for pointing this out. In the future, when asking for documentation enhancements, please provide the new text you'd like to see.