问题
I've googled a lot about the problem, but still did not find, why it is happening. When user cancels BASIC auth form in browser, blank page is appeared.
401 page is setup in Tomcat webapp, in Firebug i can see 401 Unauthorized.
Maybe some header is missing in response?
Please help! Thanks a lot in advance.
UPDATE I think, my post is not informative enough: there is also combination of BASIC auth together with Spring Kerberos auth, and when blank page is appeared, headers are:
WWW-Authenticate Negotiate Basic realm="MyRealm"
回答1:
Enabling Kerberos Authentication in Firefox. Setup params
- network.negotiate-auth.delegation-uris;
- network.negotiate-auth.trusted-uris;
to http:// for all http url`s
回答2:
You could try to add the error code customization to your web.xml
.
<error-page>
<error-code>401</error-code>
<location>/errors/401.jsp</location>
</error-page>
This will allow you to properly handle the error and offer to the user an escape...
HIH
来源:https://stackoverflow.com/questions/13583682/blank-page-after-user-cancels-basic-authentication