Just put one entry in your jboss-web..xml:
<jboss-web> <virtual-host>www.foobar.com</virtual-host> <context-root>/</context-root> </jboss-web>
And then add the [Alias] tag to your [Host] entry in server.xml (under deploy/jbossweb-tomcat50.sar):
... <Host name="www.foobar.com"> <Alias>www2.foobar.com</Alias> <Alias>foobar.com</Alias> ... </Host>
That did the trick.
Do you have to update the tomcat configuration file too?
Or is it enough to update the jboss-web.xml inside the war.
I do only update the jboss-web.xml file and it works. However it complains at startup about some vhost that is not defined.
What does this error mean?
I do not like to update central configuration files. I think that war and ear shall be selfcontained. To deploy them I just whant to put them in the deploy directory.
I get the following message in my log at deploy time when I use the jboss-web.xml config below, but it still works correctly:
[Servlet] Registration is not done -> stop
Here's the jboss-web.xml config:
<?xml version="1.0" encoding="UTF-8"?>
Can someone elaborate on why this message is posted to the log?