Thanks Chuck. Here is my context.xml now:
<Context debug="9" privileged="true"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="SampleUserDatabase" /> <Resource name="SampleUserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="/tmp/tomcatusers.xml" /> </Context> And this is in the webapp's META-INF. I also updated the webapps web.xml file so that it refers to SampleUserDatabase instead of Tomcat's UserDatabase. <resource-env-ref> <resource-env-ref-name>SampleUserDatabase</resource-env-ref-name> <resource-env-ref-type> org.apache.catalina.UserDatabase </resource-env-ref-type> </resource-env-ref> Unfortunately I still get the same error when the webapp gets deployed: 2008-03-12 16:45:58,917 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[161.2.225.250].[/sample] - Exception looking up UserDatabase under key SampleUserDatabase javax.naming.NameNotFoundException: Name SampleUserDatabase is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4096) > > > > <Context path="/sample" debug="9" privileged="true"> > > Unless your <Context> element is in server.xml (it shouldn't be), the > path attribute is not allowed; remove it. If you did put your <Context> > element in server.xml, move it to the proper location (the webapp's > META-INF/context.xml file). > > > <ResourceLink name="SampleDatabase" > > global="SampleDatabase" type="org.apache.catalina.UserDatabase" > > <Resource name="SampleDatabase" auth="Container" > > type="org.apache.catalina.UserDatabase" > > description="User database that can be updated and saved" > > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > > pathname="/tmp/tomcatusers.xml" /> > > You can't have both a <Resource> and a <ResourceLink> for the same item. > <ResourceLink> should only be used when you've defined a global > resource, which you're not doing here; remove it. > > - 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 start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Get Hotmail on your mobile, text MSN to 63463! http://mobile.uk.msn.com/pc/mail.aspx