Re: Accessing a custom user principal from a JAAS Realm

2005-10-19 Thread Yoav Shapira
Brad, No need to CC me on the reply, I get the [EMAIL PROTECTED] copy already ;) > Thanks for the reply. What version of Tomcat are you referring to? I am using > Tomcat 5.0.28. With regards to your code below, there is no > getUserPrincipal() method on the org.apache.catalina.realm.GenericPrinci

Re: Accessing a custom user principal from a JAAS Realm

2005-10-19 Thread Brad O'Hearne
Yoav, Thanks for the reply. What version of Tomcat are you referring to? I am using Tomcat 5.0.28. With regards to your code below, there is no getUserPrincipal() method on the org.apache.catalina.realm.GenericPrincipal class. Furthermore, how's this for bizarre -- if I do an "instanceof" wi

Re: Accessing a custom user principal from a JAAS Realm

2005-10-19 Thread Yoav Shapira
Hi, You'd need to cast as follows: Principal mydude = request.getUserPrincipal(); if(mydude instanceof GenericPrincipal) { mydude = ((GenericPrincipal) mydude).getUserPrincpal(); } Yoav --- Brad O'Hearne <[EMAIL PROTECTED]> wrote: > After several days of questions on the user mailing list su