If I define a custom error 401 page, I get an error 500 when I attempt to access a protected resource (protected with BASIC authentication). There is a NullPointerException thrown somewhere deep in the bowels of Tomcat. I would really like to display my own page when the user fails to authenticate, rather than displaying the default page. Is it possible to do this? I am using Tomcat 4.0.2.