You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Dockery <do...@yahoo.com> on 2010/08/30 01:03:18 UTC
Custom Realm
I need to override a single method in a standard tomcat6 realm for a particular
webApp/context.
The method: RealmBase.getPrincipal(X509Certificate usercert)
Q1) Should I create a new custom realm (..subClass of RealmBase) which is
based-on/copied-from the original/standard tomcat realm?
Q2) what all classes will I need in my new custom realm? (...only
MyCustomRealm class itself? )
Q3) Should I reference my new realm via my webapp's META-INF/context.xml file?
Q4) Should I put my realm class(es) in a jar inside the tomcat6/lib directory?
...I am new to tweaking realm's, so appreciate the feedback.
RE: Custom Realm
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Michael Dockery [mailto:dockeryjavaman@yahoo.com]
> Subject: Custom Realm
> Q1) Should I create a new custom realm (..subClass
> of RealmBase) which is based-on/copied-from the
> original/standard tomcat realm?
You can, but wouldn't it be simpler to subclass the realm whose behavior is already closest to what you want?
> Q2) what all classes will I need in my new custom realm?
A realm is usually just one class.
> Q3) Should I reference my new realm via my webapp's
> META-INF/context.xml file?
Yes.
> Q4) Should I put my realm class(es) in a jar inside the
> tomcat6/lib directory?
That's where it must go, and only there.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org