tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose MarĂ­a Zaragoza <demablo...@gmail.com>
Subject UserDatabase resource into META-INF/context.xml
Date Thu, 06 Feb 2014 12:31:29 GMT
Hello:

I'm using Tomcat 6.0.24

I want to set a realm per only one application, so I define in its
META-INF/context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource auth="Container"
 description="User database that can be updated and saved"
 factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
name=MyUserDatabase"
 pathname="conf/my-users.xml"
 type="org.apache.catalina.UserDatabase" />

<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="MyUserDatabase"/>
</Context>

my-users.xml is stored in $CATALINA_BASE/conf/


But it doesn't work; a javax.naming.NameNotFoundException exception is
thrown when Tomcat restarts


If I put <Resource> under GlobalNamingResources in server.xml , works
fine, But I would prefer to held all configuration in context.xml

is it possible ? or do I need to use GlobalNamingResources ?
is the pathname right ?


Regards

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message