tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Several hosts within one tomcat / catch-all problem
Date Mon, 22 Nov 2010 15:01:38 GMT
2010/11/21 David Fisher <dfisher@jmlafferty.com>:
>> and use JMX or call mapper.addHostAlias(..) directly to add aliases
>> programmatically at runtime.  (though there is no guarantee that the
>> Mapper API does not change between Tomcat minor releases).
>
> I investigated what an implementation of this might look like at a higher level. In looking
through the Tomcat interfaces it looks like this is similar to the notion of automatically
creating Context for users with a UserConfig listener.
>
> It would be an AliasConfig class extending HostConfig.
>  <Listener className="my.web.server.listener.package.AliasConfig" aliases="/path/to/alias/file"/>
>
> Then in the start event function it is as simple as "host.addAlias(subDomainName);" for
each alias found in the aliases file.
>
> Does this make sense?
>

It does make sense.

o.a.c.connector.MapperListener updates the mapper when the aliases
list in the Host is changed.

Best regards,
Konstantin Kolinko

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


Mime
View raw message