RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
Hi, regarding the error-page idea i have tried this and this does not work but thinking about it, for form based authentication you have to define a mandatory error page anyway so this would have precendence over any error page defined else where. A login failure always flows back to the page defined in form-error-page leaving me with the same issue of not being able to get a handle on the error. Also, i have checked out the JNDIRealm source code and it only seems to log any exception but not throw it back (seems to pass a null Principal back to the calling code to signify you could not log on). If this is the case we cannot get a handle on the error. Any other ideas? Barry, could you post your idea please? Thanks Propes, Barry L wrote: even for my antiquated version, Chuck? 4.1.36? -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 11:17 AM To: Tomcat Users List Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? I believe you can only set one standard error page in the XML file, if I'm not mistaken, at least of the specific web app itself. No, you can have a separate error page for each status or exception value in each webapp. See section 9.9 of the servlet spec. But one thing I did was flag for a specific exception to be caught, and if this matched, ran an out.println series of statements to the browser indicating to the users the problem. That's the appropriate thing to do, using error-page and exception-type declarations in WEB-INF/web.xml of the webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/RE%3A-JNDIRealm---how-to-display-login-exceptions-error-msg-within-form-error-page-when-using-Form-based-authentication--tp16591326p16605549.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, david.melia wrote: | Also, i have checked out the JNDIRealm source code and it only seems to log | any exception but not throw it back (seems to pass a null Principal back to | the calling code to signify you could not log on). If this is the case we | cannot get a handle on the error. Yup. | Any other ideas? You could try securityfilter (http://securityfilter.sourceforge.net), which also has realms, but it's much more natural to write your own Realm for securityfilter, since it's a stable interface. With your realm, you can do anything you want ;) Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf+F9oACgkQ9CaO5/Lv0PAy7QCeJNV24feMtzs2hICgayOEDGXO 51oAn2jEGGK2EJ2mA50JScSLm4vFM5nc =cBCK -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
yeah, Dave, will do. -Original Message- From: david.melia [mailto:[EMAIL PROTECTED] Sent: Thursday, April 10, 2008 3:59 AM To: users@tomcat.apache.org Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? Hi, regarding the error-page idea i have tried this and this does not work but thinking about it, for form based authentication you have to define a mandatory error page anyway so this would have precendence over any error page defined else where. A login failure always flows back to the page defined in form-error-page leaving me with the same issue of not being able to get a handle on the error. Also, i have checked out the JNDIRealm source code and it only seems to log any exception but not throw it back (seems to pass a null Principal back to the calling code to signify you could not log on). If this is the case we cannot get a handle on the error. Any other ideas? Barry, could you post your idea please? Thanks Propes, Barry L wrote: even for my antiquated version, Chuck? 4.1.36? -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 11:17 AM To: Tomcat Users List Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? I believe you can only set one standard error page in the XML file, if I'm not mistaken, at least of the specific web app itself. No, you can have a separate error page for each status or exception value in each webapp. See section 9.9 of the servlet spec. But one thing I did was flag for a specific exception to be caught, and if this matched, ran an out.println series of statements to the browser indicating to the users the problem. That's the appropriate thing to do, using error-page and exception-type declarations in WEB-INF/web.xml of the webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/RE%3A-JNDIRealm---how-to-display-login-exceptions-error-msg-within-form-error-page-when-using-Form-based-authentication--tp16591326p16605549.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? I believe you can only set one standard error page in the XML file, if I'm not mistaken, at least of the specific web app itself. No, you can have a separate error page for each status or exception value in each webapp. See section 9.9 of the servlet spec. But one thing I did was flag for a specific exception to be caught, and if this matched, ran an out.println series of statements to the browser indicating to the users the problem. That's the appropriate thing to do, using error-page and exception-type declarations in WEB-INF/web.xml of the webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
I believe you can only set one standard error page in the XML file, if I'm not mistaken, at least of the specific web app itself. But one thing I did was flag for a specific exception to be caught, and if this matched, ran an out.println series of statements to the browser indicating to the users the problem. Don't know if anything like that would help you, but that's the way I worked around it...at first I wrestled with a redirect option, then decided to give up on that, I think because it was either unpredictable or not altogether entirely accurate (from the exception involved). -Original Message- From: david.melia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 7:26 AM To: users@tomcat.apache.org Subject: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? Hi, I currently have a web application which is secured using standard J2EE security (i.e. all URL's are secured by a role). For authentication, I am using the standard tomcat JNDI realm (i.e. Realm className=org.apache.catalina.realm.JNDIRealm ...) connecting to an LDAP directory and this works fine when logging in correctly. The problem is that if i get an exception from JNDIRealm when logging in (i.e. a user has been disable or password needs changing) this exception is printed in the tomcat logs OK but I need to know about this in the error jsp defined in the web.xml (e.g. form-error-page/error.jsp/form-error-page) so that I can forward onto a change password page if needed or display an appropiate error message. Does anyone know if this is possible? -- View this message in context: http://www.nabble.com/JNDIRealm---how-to-display-login-exceptions-error-msg-within-form-error-page-when-using-Form-based-authentication--tp16585051p16585051.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? even for my antiquated version, Chuck? 4.1.36? It's been in the servlet spec since at least 2.2, so it should work in Tomcat 4.1, which is based on 2.3. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
ok, thanks. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 11:47 AM To: Tomcat Users List Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? even for my antiquated version, Chuck? 4.1.36? It's been in the servlet spec since at least 2.2, so it should work in Tomcat 4.1, which is based on 2.3. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication?
even for my antiquated version, Chuck? 4.1.36? -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 11:17 AM To: Tomcat Users List Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: JNDIRealm - how to display login exceptions/error msg within form-error-page when using Form based authentication? I believe you can only set one standard error page in the XML file, if I'm not mistaken, at least of the specific web app itself. No, you can have a separate error page for each status or exception value in each webapp. See section 9.9 of the servlet spec. But one thing I did was flag for a specific exception to be caught, and if this matched, ran an out.println series of statements to the browser indicating to the users the problem. That's the appropriate thing to do, using error-page and exception-type declarations in WEB-INF/web.xml of the webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]