Julien Martin wrote:
Hello,
I need to achieve the following:
-Having two domain names pointing to the same tomcat application and MOST
IMPORTANTLY, having for each domain name a unique context parameter
(therefore different for each domain name) that I will retrieve in my app to
display different information to my users accordingly.
How can I achieve this with tomcat? Is that possible?
Thanks in advance,
J.


On mailing lists, CAPITALS are usually taken as the equivalent of shouting, which is not very nice in a first post.

Depending on your version of Tomcat (which you didn't tell us), you may want to have a look at the on-line documentation, starting from here :
http://tomcat.apache.org/

For the rest, I'll assume that you are using the current Tomcat 6.0.

You can achieve the domain names part using the proper DNS setup, and either Alias or Virtual Hosts in Tomcat.

For Alias, look here :
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html
and look at Special Feature #4, Host name aliases

For Virtual Hosts, look here :
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

To get the hostname to which the request was addressed, you could search Google 
for :
HttpServletRequest.getServerName for examples.







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

Reply via email to