You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Koes, Derrick" <De...@smith-nephew.com> on 2002/10/07 18:22:28 UTC

HTTPServletRequest.getServerName() question

The servlet 2.3 spec simply states that, "Returns the host name of the
server that received the request."

 

If I'm running tomcat on a windows machine which is not networked (no DNS),
but is in a workgroup, this call returns an empty string in tomcat.

 

I know tomcat documentation states, "The Host element represents a virtual
host, which is an association of a network name for a server (such as
"www.mycompany.com" with the particular server on which Catalina is running.
In order to be effective, this name must be registered in the Domain Name
Service (DNS) server that manages the Internet domain you belong to -
contact your Network Administrator for more information."

 

1.	Is my problem directly traced to tomcat because of the "In order to
be effective..." statement?
2.	Is tomcat not in accordance with the servlet spec?

This electronic transmission is strictly confidential to Smith & Nephew and
intended solely for the addressee.  It may contain information which is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.