问题
How to configure in Jboss, when server is in planned maintenance(not completely down), to display an error page? thanks.
回答1:
Two possibilities:
- Inside JBoss: during the time your application, say myapp.war, is down, you can deploy another myapp.war with just a single HTML/JSP file, displaying that the server is under maintenance. See Hello, World! Web App as an example for a simple web app.
- If your JBoss runs behind another webserver, such as Apache, you can enable a rewrite during maintenance:
RewriteEngine on RewriteRule ^.*$ http://yourdoman.com/maintenance-info.html [L,R]
We use the second option because sometimes we also shutdown the JBoss instance.
来源:https://stackoverflow.com/questions/4320791/how-to-configure-a-page-to-display-while-server-is-in-planned-maintenance-in-jbo