tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Virtual host, alias and context parameters
Date Sat, 11 Dec 2010 15:06:26 GMT
Let me add something to my previous answer, to kind of wrap up also what the others responded.

(a) With the Alias solution, there will be a single copy of your web application.
To react differently depending on the hostname that the users call up, that web 
application can get the hostname of the request that was sent, and do conditional things 
depending on it.

(b) With the virtual Host solution, there will be multiple copies of your web application,

one for each different domain name.

The second solution may seem like a duplication.  However, you have to think a bit in 
advance.  Currently, maybe the difference between the application for users of host A and

the application for the users of host B are really small, and you do not think that you 
need 2 separate web apps.
But it most cases, you will find out that these differences increase with time, and that 
you will find yourself adding always more conditional code to your application, and making

it more and more complicated and less and less maintainable.
In that case, it is probably better to start with solution (b) in the first place.

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

View raw message