How to handle HTTP status 404 and redirect the user to a different page on application re-deployment?

It won't be possible to give a friendly message from within the application - since the application myapp itself is not available.

It won't be possible to give a friendly message from within the application - since the application /myapp itself is not available. The usual way to handle this is at the web server level - where you set up another temporary site when your application is out due to maintenance. Redirect all requests to a friendly error message.No requests will come through to the app server.

Any bookmarked URLs will also get the out of service page from the alternate app. A detailed approach is given at webreference.com/programming/Apache-Site... If you do not have a web server in your setup, then you can set up the maintenance page (some index. Html) on another web app setup with the same context mapping to /myapp When your EAR is down, bring up that one.

For JBoss I think you can change the location of the 404 page by setting it in server/xxx/deployers/jbosssweb. Deployer/web. Xml You'll have to make this point to some page OUTSIDE of /myapp.

Great post. I was just looking for a resource that explained how to do contingency pages. Thanks!

– Shadowman Aug 3 '10 at 17:50.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions