> -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Thursday, March 13, 2014 10:40 AM > To: Tomcat Users List > Subject: Re: Site down for maintenance senario > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > John, > > On 3/12/14, 2:28 PM, John Smith wrote: > > Is there a straightforward way to toggle or add something in Tomcat, > > in the event a webapp is intentionally taken 'offline for > > maintenance"? The user would receive the same single notification > page > > saying as much, for any and all requests. > > > > Tomcat 7.0.42 > > Deploy a ROOT web application whose 404 page says "Down for > maintenance". You could even customize this kind of thing to only > respond to certain URL-prefixes (like [ROOT]/mywebapp/*). > > What will you do while Tomcat is restarting, though, if you have to > restart? >
This kind of requirement is where fronting with HTTPD comes in handy. Of course, if you're restarting HTTPD, you still won't get an error message.