Please do not cross post.
Identify the forum most appropriate for your question and just ask it there.
Confront ur tomcat with an apache front end and create a virtual host that will point xxx.domain.com to domain.com/xxx. Checkout the section on virtual hosts in httpd.conf from apache documentation. There is nothing that jboss or tomcat can do here.
Quote "There is nothing that jboss or tomcat can do here."
This is wrong. In your /WEB-INF/jboss-web.xml file you can have a <virtual-host>xxx.domain.com</virtual-host> entry.