• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Virtual Hosting with Tomcat – JBoss

Virtual Hosting with Tomcat – JBoss

Add hosts and aliases to server.xml:

  • <Host name=”myhost.com”>
  • <Alias>www.myhost.com</Alias>

</Host>

Register applications for virtual hosts in their WEB-INF/jboss-web.xml files:

  • <jboss-web>
  • <context-root>/myapp</context-root>
  • <virtual-host>myhost.com</virtual-host>

</jboss-web>

Applications default to host specified by <Engine>’s defaultHost attribute

Learn the core features of JBOSS Traning and become master with our expertise tutorials.

server.xml

<Server>

<Service>

<Connector …/>

<Engine>

<Host name=”myhost.com”>

<Alias>www.myhost.com</Alias>

</Host>

<Host name=”anotherhost.com”/>

</Engine>

</Service>

</Server>

myapp.war/WEB-INF/jboss-web.xml: 

<jboss-web>

<context-root>/myapp</context-root>

<virtual-host>myhost.com</virtual-host>

</jboss-web>

ROOT-another.war/WEB-INF/jboss-web.xml: 

<jboss-web>

<context-root>/</context-root>

<virtual-host>anotherhost.com</virtual-host>

</jboss-web>

For indepth understanding on JBoss click on:

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Virtual Hosting with Tomcat - JBoss"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.