Group Discounts available for 3+ students and Corporate Clients

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 *

    Support


    Please Enter Your Details and Query.
    Three + 6