You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by William Shulman <wi...@mercedsystems.com> on 2002/03/27 09:37:28 UTC

getting server host and port

Hello-

I am trying to write code that gets the host and port of the running
tomcat server. Anyone know how to do this?

-will

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: getting server host and port

Posted by Bernhard Wraase <bw...@netkosmos.de>.
> I am trying to write code that gets the host and port of the running
> tomcat server. Anyone know how to do this?

In any good servlet book you will find information about:

javax.servlet.http.HttpServletRequest.getServerName
javax.servlet.http.HttpServletRequest.getServerPort

-- 
Regards Bernhard Wraase

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>