Create Your Custom 404 Error Page With JBoss E-mail
Bram
Tuesday, 26 January 2010 15:41

At the moment my project team and me are programming a Bank web application.

 


It is build using JBoss with JSF, and we are using JAAS for security reasons.
Since there can be many errors, a custom 404 error page can come in handy.
With JBoss, it isn’t all that difficult …  you just need to know how.

To do so ... edit your web.xml. You have to add this:
< web-app>
    ...
        < error-page>
            < error-code>404< /error-code>
            < location>/YourLocation/YourErrorPage.html< /location>
        < /error-page>
    ...
< /web-app>

Since much is done dynamically, you don’t have to define anything else but this.
(Of course you have to create your own error page)

As for complications:
I’m running Firefox and it all worked fine, but a member of my team is running Internet Explorer,
He got a “This webage cannot be found” message … after a little bit of googling, this was the trick:
Go to: Internet Options … Advanced Tab … and uncheck “Show friendly HTTP error messages”

Last Updated on Wednesday, 27 January 2010 00:19