You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Delbecq <de...@oma.be> on 2006/03/27 09:33:13 UTC
accessing mehods of GenericPrincipal
Hello,
LDAP Realms (and probably others) in tomcat uses GenericPrincipal as the
Principal instance. This GenericPrincipal provides interresting methods
like 'getPassword()' which is very usefull when your webapp has to
forward the credential to a specific library before using it.
Unfortunately, typecasting to GenericPrincipal like that
String password = ((GenericPrincipal)principal).getPassword();
Does not work, as it seems the GenericPrincipal class is not exposed to
webapp at runtime:
Exception Class: class java.lang.NoClassDefFoundError
Message: org/apache/catalina/realm/GenericPrincipal
Is there a recommanded way to access this information (user suplied
password) from the webapp? Or will i have to play with reflection api or
beanutils to extract this property?
Thanks for follow ups.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org