I tried doing your code but I get still get the same error.
Are you using IE ? IE does not display the customized error Page. It display its own page.
Originally posted by Joseph Sondow:
It's very helpful to know that the errorPage attribute does not work correctly with the default settings in the most popular browser.