jboss-web.xml

 

This file descriptor can be bundled in a web application under the WEB-INF folder to define some specific configuration elements, related to the Web application context or to the Security configuration.

 

Here's an example which defines a custom context root for the Web application

<jboss-web>
    <context-root>bank</context-root>
</jboss-web>


Here's a jboss-web.xml example which uses the JaasSecurityMgr other security domain for authentication and authorization of secured web content.defines the security a custom context root for the Web application.

<jboss-web>
    <!-- Use the JaasSecurityMgr other security domain for authentication
      and authorization of secured web content.
     -->
    <security-domain>java:/jaas/other</security-domain>
</jboss-web>


 Here's an example which uses jboss-web.xml to define a Virtual Host

Note that when a WAR file is deployed, it is associated by default with the virtual host whose name matches the defaultHost attribute of the containing Engine.
To deploy a WAR to a specific virtual host you need to specify an appropriate virtual-host definition in your jboss-web.xml descriptor.
The following jboss-web.xml descriptor demonstrates how to deploy a WAR to the virtual host www.myhost.com.
<jboss-web>
 <context-root>/</context-root>
 <virtual-host>www.myhost.com</virtual-host>
</jboss-web>


The above virtual host needs to match the corresponding Host alias defined in the server.xml file
<Host name="myhost.com" autoDeploy="false" deployOnStartup="false" deployXML="false">
 <Alias>www.myhost.com</Alias>
</Host>

0
0
0
s2sdefault

Related articles available on mastertheboss.com

JBoss MBeans POJO

JMX MBean services are the core building blocks of the JBoss Appl

How to a dump of JNDI tree with JMX console ?

#2 JBoss Howto. This is the recipe of the day

How to configure JBoss to bind to a different IP ?

If you want to change the jboss.bind.address property use the&nbs

How to shut down JBoss from remote ?

JBoss recipe of the day

How to create multiple instances of an Mbean?

  Supposing you need two instances of an MBean, let's say one fo

JBoss classloader issues

By default JBoss (prior to version 3.2) uses a flat class loading