users@glassfish.java.net

Re: Send a maintenance page instead of 404 error

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Mon, 24 Oct 2011 09:52:34 -0400

That won't work, because the web.xml won't be read if the application is disabled. I can think of a couple options (others may know better).

1. Add static web pages to domainX/docroot to match your application's URL. For instance, there's already an index.html page there that's shown if no app is deployed with context root set to /. But if you deploy an app to /, it takes precedence over the static content.

2. Set a default module for the virtual server in your config/Virtual Servers panel in admin console. You can set this to some small web app you deploy that just contains a maintenance page. Then disable the original application. When it's time to enable the app again, you may have to set this default module to blank first.

Cheers,
Bobby

On Oct 21, 2011, at 12:05 PM, Steven Siebert wrote:

> This post should help: http://blogs.oracle.com/arungupta/entry/totd_136_default_error_page
>
>
> On Fri, Oct 21, 2011 at 12:01 PM, <forums_at_java.net> wrote:
> Running version 3.0.1. I would like to have the system respond with a
> maintenance page instead of a 404 error if an application has been
> disabled. How do I configure glassfish to do this?
>
>
> --
>
> [Message sent by forum member 'jbeckstrom']
>
> View Post: http://forums.java.net/node/855909
>
>
>
>
>
> --
> S
>
> "When all you have is a hammer, everything looks like a skull."
>