As pointed out by Jim Horner in the help-forum <http:
//sourceforge.net/forum/forum.php?
thread_id=987670&forum_id=200425>, it sometimes is
helpful if a realm implementation can access the servlet
context and its resources. I needed this too, hacked a bit
adding a SecurityRealmInterface.init( ServletContext
context ) method which is overwritten in the
implementing classes. This method is called by
SecurityFilter.init when initializing the filter.
I first published the attached patches in the
forum-thread, but later realized that it probably would be
better to send them here.
Since we're still alpha, I think this could be added to 2.0
without creating greater difficulties (if it's considered a
good solution, of course).
Lars
Patch for SecurityRealmInterface
Patch for SimpleSecurityRealmBase
Patch for SecurityFilter
Patch for CatalinaRealmAdapter
Logged In: YES
user_id=70623
is there a reason for not integrating this into the 2.0 release?
it would also had made possible to actually link the Catalina Realm
instantiated by the adapter to its context, allowing a correct use of
DataSourceRealm and others that require references to other Tomcat
objects.