Re: Find out Who-I-Am for Realm User

2008-07-31 Thread Alessandro Ferrucci
Well actually, the proposed solution I suggested requires you to use a third party project called SecurityFilter, which emulates container managed security: http://securityfilter.sourceforge.net/. When using securityFilter you are in control of setting SecurityFilter as a custom servlet filter in

Re: Find out Who-I-Am for Realm User

2008-07-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guojun, Guojun Zhu wrote: | I am | wondering whether I can find out who is the login user in realm? I think you're looking for HttpServletRequest.getPrincipal(). Calling Principal.getName() will give you the username of the currently-logged-in

Find out Who-I-Am for Realm User

2008-07-30 Thread Guojun Zhu
Hi, I am using realm for the authorization of my web application. I would like to include a administration section for things like modifying the user profile or password. I have several different user names associated with two different roles. Both roles give the pass to the web pages. I am

Re: Find out Who-I-Am for Realm User

2008-07-30 Thread Alessandro Ferrucci
What authentication method are you using? I'll take a wild guess at form. This thread provides a few workaround solutions for this: http://www.theserverside.com/discussions/thread.tss?thread_id=32033 I suggest looking into writing your own filter and placing it above SecurityFilter in the stack

Re: Find out Who-I-Am for Realm User

2008-07-30 Thread Guojun Zhu
Thank you. I am using the basic authentication as the manager package of Tomcat. Something like this in the web.xml. login-config auth-methodBASIC/auth-method realm-nameTomcat INFORM Application/realm-name /login-config I only know how to use the realm in the web.xml and servel.xml. But I am