Show TOC Start of Content Area

Background documentation Obtaining the Remote Host Address  Locate the document in its SAP Library structure

You can use methods of the ServletRequest object to obtain the address of the remote server you communicate with. One of the methods is getRemoteAddr(), which returns the IP address of the server, and the other is getRemoteHost(), which must return the server’s fully qualified host name. However, the AS Java’s Web Container is configured by default in a way that the getRemoteHost() method also returns the IP address of the remote server (that is, it does not attempt to resolve it to the corresponding host name).

The behavior of the getRemoteHost() is controlled by the ResolveHostName property of the Web Container Service. If you set this property to true, then the AS Java attempts to resolve the remote server’s IP address so that the above method returns the corresponding fully qualified host name.

Note

Resolving the IP address may be a slow process (depending on your network setup), which can result in reduced performance of the Web application.

End of Content Area