1 Reply Latest reply on Apr 1, 2010 5:09 PM by ntribble

    Expected 404 got a blank page.

      Hi all,

       

      I'm setting up a virtual host everything seems to be working, except, only the default host in the jbossweb.sar/server.xml

       

      <Engine name="jboss.web" defaultHost="host1">

       

      <Host name="host1" autoDeploy="false" deployOnStartup="false" deployXML="false">
                 <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="host1-" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/>
               </Host>

       

      setup thusly is showing any HTTP status pages.

       

      I have another host set up

       

      <Host name="host2" autoDeploy="false" deployOnStartup="false" deployXML="false">
                 <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="host2-" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/>
               </Host>

       

      and when I navigate to a path that doesn't exist on this host all I get is a blank page, no 404 like I get if I navigate to a non existant path on the defaultHost.

       

      I'm running Ubuntu 9.10 in my /etc/hosts file I have

       

      192.168.1.213    host1 host2

       

      I'm using Jboss AS 5.1.0.GA

       

      started with

       

      ./run.sh -c dev-web -b 192.168.1.213

       

      keep in mind that applications I have deployed to the two virtual hosts are working fine, just when I navigate to a non existant app on host2 I just get a blank page, where if I navigate to a non existant app on host1 I get the Jboss HTTP Status 404 page.

       

      Did I miss setting something up that would let the non defaultHost display Status Pages? Or is what I'm expecting not possible? Any help would be greatly appreciated. Thanks

        • 1. Re: Expected 404 got a blank page.

          Of course after working on it all day, as soon as I post a question I answer it myself. I ended up creating a jboss-web.xml file in the WEB-INF directory of ROOT.war, and specifying both of my hosts as virtual hosts, which solved my problem.