Is there an accepted way for an application to directly access/manipulate the
tomcat-users.xml database? I would like to automate the process of adding users
from my servlet but I am having a hard time finding documentation/samples of how
to do this. It may just be that I don't know how to grant access to this
resource to my app. I have added a line like
grant codeBase "file:${catalina.home}/webapps/my_appt/WEB-INF/classes/-" {
permission java.security.AllPermission;
};
to the catalina.policy file. My code compiles but I get a
java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm
error that I assume is due to an access restriction.
Any ideas? Thanks in advance.
Robert