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
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
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
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 in my servlet
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
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
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
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