tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georg Sauer-Limbach <>
Subject Re: Retrieving host name
Date Mon, 20 Feb 2006 01:57:59 GMT
> How can I retrieve the host name (defined in the tomcat server.xml) or some
> unique host id in a JSP/Servlet code?

request.getRequestURL() returns the complete URL the client
used. If you have multiple <Host>s in your tomcat
installation, then here you see the host name used.

See javax.servlet.http.HttpServletRequest.getRequestURL
at .


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message