How can we display some message saying that 'Site is down and will be up in specifi开发者_运维知识库c time' using filters and caching techniques in servlets.
That is impossible. You need to bring another (light weight) web server in front of your servlet container which forwards the requests to the servlet container and is been configured to display such a maintenance page as 404/503 error.
This is doable with for example Apache HTTPD server in front which uses the Tomcat Connector (also known as mod_jk
) to forward the requests to Tomcat/JBoss.
精彩评论