webservices/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataCreator.java
private void createJBossWebAppDescriptor(final Deployment dep, final JBossWebMetaData jbossWebMD) {
         WSLogger.ROOT_LOGGER.trace("Creating jboss-web.xml descriptor");

        // Set security domain
        final String securityDomain = ejb3SecurityAccessor.getSecurityDomain(dep);
        final boolean hasSecurityDomain = securityDomain != null;

        if (hasSecurityDomain) {
             WSLogger.ROOT_LOGGER.tracef("Setting security domain: %s", securityDomain);
            jbossWebMD.setSecurityDomain(securityDomain);
        }

        // Set virtual host
        final String virtualHost = dep.getService().getVirtualHost();
        ServerHostInfo serverHostInfo = new ServerHostInfo(virtualHost);
        if (serverHostInfo.getHost() != null) {
            WSLogger.ROOT_LOGGER.tracef("Setting virtual host: %s", serverHostInfo.getHost());
            jbossWebMD.setVirtualHosts(Arrays.asList(serverHostInfo.getHost()));
            if (serverHostInfo.getServerInstanceName() != null) {
                jbossWebMD.setServerInstanceName(serverHostInfo.getServerInstanceName());
            }
        }
    }
private void createJBossWebAppDescriptor(final Deployment dep, final JBossWebMetaData jbossWebMD) {
         WSLogger.ROOT_LOGGER.trace("Creating jboss-web.xml descriptor");

        // Set security domain
        final String securityDomain = ejb3SecurityAccessor.getSecurityDomain(dep);
        final boolean hasSecurityDomain = securityDomain != null;

        if (hasSecurityDomain) {
             WSLogger.ROOT_LOGGER.tracef("Setting security domain: %s", securityDomain);
            jbossWebMD.setSecurityDomain(securityDomain);
        }

        // Set virtual host
        final String virtualHost = dep.getService().getVirtualHost();
        ServerHostInfo serverHostInfo = new ServerHostInfo(virtualHost);
        if (serverHostInfo.getHost() != null) {
            WSLogger.ROOT_LOGGER.tracef("Setting virtual host: %s", serverHostInfo.getHost());
            jbossWebMD.setVirtualHosts(Arrays.asList(serverHostInfo.getHost()));
            if (serverHostInfo.getServerInstanceName() != null) {
                jbossWebMD.setServerInstanceName(serverHostInfo.getServerInstanceName());
            }
        }
    }
Creates jboss-web.xml descriptor meta data.
<p/>
<pre>
&lt;jboss-web&gt;
&lt;security-domain&gt;java:/jaas/custom-security-domain&lt;/security-domain&gt;
&lt;context-root&gt;/custom-context-root&lt;/context-root&gt;
&lt;virtual-host&gt;host1&lt;/virtual-host&gt;
...
&lt;virtual-host&gt;hostN&lt;/virtual-host&gt;
&lt;/jboss-web&gt;
</pre>

@param dep        webservice deployment
@param jbossWebMD jboss web meta data