Re: REALM question - please help

2003-06-27 Thread Dinh, Chinh
Thanks for your help . I'm new to TOMCAT , so I may have some confusion. I thought it's the way that TOMCAT does. We have to use REALM to authenticate as we define this in web.xml : login-config auth-methodBASIC/auth-method realm-nameMyRealm/realm-name /login-config It will pop up

Re: REALM question - please help

2003-06-27 Thread Jean-Francois Arcand
Dinh, Chinh wrote: Thanks for your help . I'm new to TOMCAT , so I may have some confusion. I thought it's the way that TOMCAT does. We have to use REALM to authenticate as we define this in web.xml : login-config auth-methodBASIC/auth-method realm-nameMyRealm/realm-name /login-config

Re: REALM question - please help

2003-06-27 Thread Bill Barker
Ok, so I forgot that TC 4.1 doesn't allow access to the Request in Realm :-(. So the easiest way to do this is to put a reference to Realm in your own custom Principal, and in your Servlet, cast up and get it from there. Or, better, just store the USER in your principal when you create it. This

REALM question - please help

2003-06-26 Thread Dinh, Chinh
I have a tomcat question for you . In Tomcat’s server.xml, we define a realm (only ONE) Realm classname = “com.mypackage.myRealm” When tomcat starts, I think it will instantiate a realm object of this type . I am trying to find a way to access this realm object in my servlet

Re: REALM question - please help

2003-06-26 Thread Jean-Francois Arcand
Dinh, Chinh wrote: I have a tomcat question for you . In Tomcats server.xml, we define a realm (only ONE) Realm classname = com.mypackage.myRealm When tomcat starts, I think it will instantiate a realm object of this type . I am trying to find a way to access this realm object

Re: REALM question - please help

2003-06-26 Thread Dinh, Chinh
Thanks for the response. My situation is like this: - I created my own Realm for webDAV access. When I launch http://localhost:8080/webdav, it will first call myREalm's authentication(). Within authentication(), I calls some existing authentication class, which returns a USER object

Re: REALM question - please help

2003-06-26 Thread Jean-Francois Arcand
Dinh, Chinh wrote: Thanks for the response. My situation is like this: - I created my own Realm for webDAV access. When I launch http://localhost:8080/webdav, it will first call myREalm's authentication(). Within authentication(), I calls some existing authentication class, which returns a

Re: REALM question - please help

2003-06-26 Thread Bill Barker
I agree with Jean-Francois that the design is less than perfect ;-). You should probably re-think it. However, I'm willing to give you more than enough rope to hang yourself ;-). 1) If your custom Realm is configured under a Context ..., then simply have if save an instance of itself into the