Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tomcat DataSourceRealm

843841Aug 13 2003 — edited Sep 9 2003
I'm having a great deal of trouble setting up a DataSourceRealm (DBCP)in Tomcat (version 4.1.24-LE-jdk14). I want to use the realm to protect the Tomcat Manager App, and my web app. No matter how I seem to configure the server.xml file, I keep getting the following error:

Javax.naming.NameNotFoundException: Name java: is not bound in this Context

My latest iteration is to have all the <Resource> and <ResourceParams> information in the <GlobalNamingResources> tag. The default Tomcat server.xml file has the realm right under the <ENGINE> container, so that's where I added my DataSource Realm. That looks very similar to what's in the Tomcat docs, i.e.


<Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
dataSourceName="java:/comp/env/jdbc/authority"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name"/>

Of course, my sepcific details are in there.

But now I'm stuck on what to do next. Docs talk about adding configuration information to a Context ... but what do I add, and where is the context for the Manager App?

I'm sure this is simple .. but just don't see the solution. Any guidance would be greatly appreciated.

Rich


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2003
Added on Aug 13 2003
3 comments
386 views