Knowledge Base - FAQ

Question: JBoss Application - VHost Mappings

Include a jboss-web.xml alongside your web.xml in your war's WEB-INF. Here is a sample that will make your application the "root" application:

<?xml version="1.0"?>
<!DOCTYPE jboss-web>

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

You can optionally specify another context:

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

Which would then be accessed via:

http://domain/myapp

You can even do virtual hosting, using this:

<?xml version="1.0"?>
<!DOCTYPE jboss-web>

<jboss-web>
  <context-root>myapp</context-root>
  <virtual-host>apphost1</virtual-host>
</jboss-web>

And then define hosts in your deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml


Last Modified: Jul 11, 2006


Kattare is Trustwave Certified and Safe Harbor Certified | Rated Safe For Kids by ICRA | All Rights Reserved Worldwide
Copyright © 1997 - 2012 Kättare Internet Services | Processed in 0.014 seconds by pyramid-06 in Corvallis, Oregon