Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I show a "temporarily out of service" page to web-app users during maintenance?

Tags:

java

jsp

I develop and maintain small intranet web apps written in JSP and Java. They run on a Resin web server, without dedicated httpd like Apache.

Before performing maintenance, I activate a very simple Ajax message to urge users to logout.

What I want is, while I do maintenance, a user trying to log in to that particular app to see a "Sorry, temporarily out of service" page, while all other web apps running on the same web server are available as usual.

What are some best practices in this situation?

like image 963
ulm Avatar asked Oct 19 '08 02:10

ulm


2 Answers

Setup an alternate site on your webserver with the outage message. Then when doing maintenance, redirect your website to the maintenance site while up update it. That way if users have pages other than the default page bookmarked, they will still get the outage message. Otherwise, a simple approach is to just swap out your default/login page with a maintenance page.

like image 144
Annagram Avatar answered Sep 28 '22 07:09

Annagram


I just swap out the first page of the web app with a linkless page containing the message you mentioned.

like image 45
MetaGuru Avatar answered Sep 28 '22 07:09

MetaGuru