Like all CMS systems like wordpress, Drupal has maintenance mode where user see custom message indicating site is been offline for maintenance. How can I do that in my web application made using struts?
My ideas:
1) Design separate web application with same context path and live it during maintenance and offline your original site. That second app only contains maintenance page and for page not found too it displays maintenance page.
2) Putting maintenance mode value in properties file or some xml file or database value and on every action call checking it, if it's true then redirecting to maintenance mode page. (Better than first one but there are many actions already made, will consume lot of time to insert condition code in each of them, specially in dispatch action files, but this will be permanent inbuilt app solution.)
What I am looking for?
Creating some sort of global action, which redirects every action path to maintenance page.
something like this:
<action-mappings>
<action path="/*" forward="/jsp/maintenance.jsp"/>
</action-mappings>
Any ideas would be greatly helpful.
Thanks.