Torgeir: It worked! Thanks a lot.
Jingmei -----Original Message----- From: Torgeir Veimo [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 5:36 PM To: Slide Developers List Subject: Re: How to authenticate users in WebdavServlet? Jingmei Li wrote: > Torgeir: > > Thanks for the suggestion. I ran into some problems when trying your > solution: > > MySlideRealmPrincipal is my implementation of Principal. I wanted to add > additional methods to MySlideRealmPrincipal , but how can I access those > methods from WebdavServlet? java.security.Principal is an interface so that > it doesn't allow me to cast req.getUserPrincipal() to MySlideRealmPrincipal > (ClassCastException). Oops, didn't look close enough. This is a very specific problem with tomcats classloaders. You must put the Principal implementation in a jar under common/lib, the realm implementation under server/lib, and not at any time have the principal impl (or the realm impl, but not that important) under the webapps classpath. This is a bit tricky, but works when you get it right. -- -Torgeir -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
