tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georg Sauer-Limbach <g...@gslweb.de>
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 http://java.sun.com/j2ee/1.4/docs/api/index.html .

Georg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message