users@glassfish.java.net

About static and virtualhosts

From: Bruno Bonfils <asyd_at_asyd.net>
Date: Fri, 21 Aug 2009 14:40:09 +0200

Hello folks,

I'm trying to understand how glassfish manage static contents when
virtual hosts are used. I have the following configuration:

- one DAS
- one node agent
- a lot (~10) instances managed by the node agent
- a static file status.htm in earch instance's docroot directory. This file is
  used by our load balancers to check if the server must be in the pool
  of the real servers
- each instance have at least one another virtualhost than server, with
  for example www.host1.com, and a default webapplication configured.
  For sure, there is no status.htm file in the webapplication's war.

With glassfish 2.1u2, I'm able to hit, www.host1.com/status.xml,
however, sometimes glassfish return a 404. When I check access logs, I
saw /webapp/status.xml 404 when glassfish return a 404, that means
glassfish try to check in the application's contents to server the
status.xml. But most of times, glassfish server instance
root/docroot/status.htm. As you can see, the glassfish's behavior in u2
is not really predictable/constant

Using version 2.1u3, glassfish always send a 404 when I request
www.host1.com/status.xml, and I see in the access log that it want to
serve <webapplication>/status.xml

So my question are, since there is a difference between the behavior of
u2 and u3, is that a well known bug?

With u3, is possible to serve some static contents (available in the
docroot directory) when a default application is configured for a
virtual host?

Thanks
-- 
http://asyd.net/home/    - Home Page
http://guses.org/home/   - French Speaking (Open)Solaris User Group
http://netvibes.com/asyd - Portal