tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jill Han" <jill....@alverno.edu>
Subject RE: customize HTTP Status 401 error page
Date Thu, 23 Apr 2009 17:20:01 GMT
I still need helps.
Here is the web.xml
...
<login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>TESTING</realm-name>  
  </login-config>
 
   <error-page>
    <error-code>401</error-code>
    <location>/error.html</location>
  </error-page>
...
The error.html is replaced the 401 error message, however there will be no authentication
window prompted, error.html is somehow loaded all the time.

Thanks,
Jill
-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Thursday, April 23, 2009 10:18 AM
To: Tomcat Users List
Subject: Re: customize HTTP Status 401 error page

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jill,

You've hijacked your own thread. :(

On 4/23/2009 11:09 AM, Jill Han wrote:
> If using Basic authentication, the unsuccessful login, or just click
> "Cancel" button will trigger the 401 page.
<
> My question is 
> 1. is there a way to customize "cancel" action? So there will be no error message prompted.

No.

> 2. Is there a way to customize tomcat HTTP Status 401 error message
> to a more user meaningful one?

Yes. See the section of web.xml that has <error-page> entries.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknwhqwACgkQ9CaO5/Lv0PDMlwCfaUP6+zxHQPeY2aTAfnNg2vPs
CGsAn1VpRpeMpCps63lgXkS8nGS1FA61
=6j3U
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

Mime
View raw message