tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: UserDatabase resource into META-INF/context.xml
Date Tue, 11 Feb 2014 20:58:39 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jose,

On 2/6/14, 7:31 AM, Jose MarĂ­a Zaragoza wrote:
> 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

Try setting localDataSource="true" on your <Realm> element.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS+o78AAoJEBzwKT+lPKRYtSwP/3DXAVM8qr0YyvnQNOboYGfn
gvYpEANinhoibJz7c1SGnD7EC4gau7lrQgJNzh+hIuRI5VzjUXCMaC/YNKiQ5xy4
/bdJi/tbleLP2c7VuLc/unF97fIgxGAfN4ZwYzFpy8pl75Ofj77R7SBV/5bo/2HF
N5If+BDjtNNZ2sFeICqHP7iVaq5cmaq1x0fVMR5oPpkzSrxfLKTv94/Ihg2rmayM
frZU24bf1CRdDvmNO81P0a+EHQolCriDs7qtMzl8BDXb8E91WdnQLsGHZMaTTZHK
toVsetxQi6Cxu5iMoXdIQdUiyKuGiMaoNYDj5DUGwhknHSOZK5lItRC5rv9hliuW
CgqQLDhFJOAJn/K7nO5BEg5ARBOw+HaeKcckc/xSjpSd2PgOpveD+JrVxDDw2PDp
Bu+yYBdsqbcXMFV6gng3xnQoRlOZY1hgTR39zm5HmnlWxk4dbV64/Ka2FYtt6X1a
M5UKQVV1RmfjrVjCVi76wC33dEgbLIZaxB7Q58Vwh/0kCBluIz+E/ahXYCGNl76f
jjYnofK7Sz0PQDUgnXEH6NgeB5Mfr0CdB/8luvPEDEvz99OfwZvtSA3iY0BwShbR
5hPxYdgZTg/r8DRAD+6ssfvEOUQuurlWnaeWFef4h5tnKrIBWmsLh+4vEYOro60n
HSVwe8f898u0cMbBuJ8b
=ggO/
-----END PGP SIGNATURE-----

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


Mime
View raw message