I'm looking for guidance on configuring custom error pages in our JBoss App Server across *all* the applications.
For e.g, lets say we have 4 applications running under jboss. I know how to configure error pages per application, but I would like to configure them in a central place and have them take effect in all 4.
I found some resources for configuring error pages per application (http://it.amid.com/2009/03/06/custom-404-page-using-jboss/), but none that could suggest configuring them across all applications.
Thank you for the reply. I am using version 4.2.3 and I have successfully added the error-page tag in web.xml in
When I go to http://host:8080/blablah, I see the customized 404 page.
However, when I go to http://host:8080/app1/blablah or http://host:8080/app2/blablah, etc, I get the standard JBoss error.
I think I am almost there, and missing an obvious step, but easy step ... any ideas?
I've added this line in server/xxx/deploy/jboss-web.deployer/conf/web.xml:
and added the 404.html file in ROOT.war, with partial success.
http://host:8080/blablah - returns correct 404 page
http://host:8080/app1/blablah - returns a blank page ...
What might be causing the blank page? I don't see anything unusual in the log files ... hmm ... /-:
If there is a way, the global web.xml is not it. Think of it this way - the configuration for a web app is the combination of the contents of the global web.xml and the web.xml specific to that app. Thus to get the 404 page for app1, you would have to place a copy of 404.html into app1.war (though you do not need to add anything to the web.xml for app1 - the global web.xml declaration is sufficient.) But this still would not work if the user entered a bad context name (for example http://hostname:8080/nosuchapp/aaa) - that would still give the app server's built in error message.
There is probably a way of using a filter, or some other mechanism, to do this, however. Perhaps someone knows off-hand.