Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle page maintenance with spring MVC

Tags:

java

spring

jboss

Does anyone have expirience with maintenance page using spring MVC? What I am currently doing is I have one shell script which copies index.html and css to web app root folder, and when they are done with copying the maintanence site is displayed.

In meantime I do changes I delete classes and upload the new ones and then delete html and css files and everything is back to normal. This works on tomcat server, but when I tried this on jboss server, I get 404 page which is trying to point to index.jsp which naturally doesn't exist.

Is there a way to handle this more elegantly? I'm sure there must be, can someone share their expirience with this? thank you

like image 346
London Avatar asked Oct 12 '22 14:10

London


2 Answers

Put an Apache HTTPD server in front which uses the Tomcat Connector (als known as mod_jk) to delegate the requests to Tomcat/JBoss. Configure Apache HTTPD to display the desired maintenance page as 404/503 error page.

like image 147
BalusC Avatar answered Oct 15 '22 11:10

BalusC


have a look at this - fully programmatic - solution:

Spring-MVC interceptors

like image 20
Eddy Avatar answered Oct 15 '22 09:10

Eddy