-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kris,
On 2/23/12 9:23 AM, Kris Easter wrote: > We're using Form based JNDIRealm Authentication against an LDAP > server and it's all working fine except for one issue. When a user > enters an invalid username/password they get sent to the error > page, but they also get sent to the same error page if the LDAP > server is down. Is there a way to trap the exception and redirect > them to a different error page or, using a servlet as an error > page, somehow pick up on the exception and display a slightly more > specific error message like, "Please contact the help desk. The > authN server is unreachable."? The standard Tomcat realms are fairly simple in the feedback they can give the rest of the container (and therefore your webapp): they basically give a fail-or-succeed return value with no information about the failure if there was one. If you want to get more information, you'll have to at least customize a Realm for yourself or, possibly, use a different authentication system like Spring Security (which I haven't actually used) or securityfilter (which I have used, though it's getting kind of long in the tooth). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9K8DAACgkQ9CaO5/Lv0PAuPwCgmbrDFQZKQEyeVR63pAIza2XQ VeIAoLyu8WbZsZ0yDW5VWjTiQ9T7dNkS =FCwY -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org