Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Help needed with Jetty 6.1.17 & Jboss 4.0.5GA virtual hosting problem

Title: Help needed with Jetty 6.1.17 & Jboss 4.0.5GA virtual hosting problem

Hi everybody,

        I have 2 webapps deployed in the same JBoss/Jetty server. In Jetty 5.1.14 I had the following jetty-web.xml which configured one of the apps to run as a virtual host (on the same port):

<Configure class="org.jboss.jetty.JBossWebApplicationContext">
  <Call name="addVirtualHost"><Arg>app2.localhost.com</Arg></Call>
</Configure>

        This worked perfectly fine. (Of course, for this email example I've changed the virtual host name.)
        Unfortunately, it doesn't work with Jetty 6.1.17 at all. First of all, "JBossWebApplicationContext" is now called "JBossWebAppContext", and secondly I have done some digging and found out that I should be using a jetty-web.xml that looks like this:

<Configure class="org.jboss.jetty.JBossWebAppContext">
  <Set name="VirtualHosts">
    <Array type="java.lang.String">
      <Item>app2.localhost.com</Item>
    </Array>
  </Set>
</Configure>

        But this doesn't work at all. The apps deploy without error, but when I try to access the 2nd app under the virtual host, it just accesses the first app instead.

        Any ideas on how to solve this? Unfortunately, I've spent quite a bit of time on it and can't get it to work at all. Any help would be greatly appreciated.

Sincerely,

        Daryl.


Back to the top