dev@glassfish.java.net

Re: docroot/index.html and upgrades

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Wed, 30 Sep 2009 10:58:13 -0700

Bobby Bissett wrote:
> Hi all,
>
> When a domain is upgraded from 'version X' to v3, docroot/index.html
> comes along for the ride unchanged. So if a user starts up v3 and hits
> localhost:8080, there will be a message saying that the server is
> version X instead. You'll have to trust me (for now), but there's an
> issue filed:
>
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=9814
>
> I don't think this is a bug since the proper thing happened and the html
> page is shown unchanged, but do we want to handle this case to avoid
> confusion? The fix is simple in theory (copy over the one in
> lib/templates), but then we're losing an html file that could have been
> changed by the user at some point, which is a potentially Bad Idea.
>
> So I'd rather just document this behavior. Any objections?
>
> Cheers,
> Bobby
>

I think it is right not to change the index.html that user might have
customized. But I'd think that it is appropriate to "upgrade" index.html
if we know that the one that exists came along with the domain creation
or previous installation.

At the very least, will it be possible to change the "version" string
inside the index.html upon upgrade? It is probably some regex tinkering
around matching:
Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)
(as far as upgrade from v2 is concerned). Similar thing for
Prelude/Preview. If the pattern is not found, it falls through.

Again, I am fine documenting this, just that the default case should
be handled especially if it is easy ...

-Kedar