Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuring the JDBC Realm

Status
Not open for further replies.

GoTerps88

Programmer
Apr 30, 2007
174
US
I seem to have some problems configuring the JDBC Realm for Tomcat. I am using the NETBEANS 5.5.1 IDE. I put the JDBC Realm properties in both the server.xml and the context.xml files within the application, but it's still prompting me for the Tomcat Manager password. However, if I use the default Memory Realm, it prompts me for the tomcat users.xml username and password. That works fine.

I seem to have problems finding good documentation for this, can someone provide some help? Thanks.
 
I figured it out. Thanks anyway.

I'm not sure what I did right, but it's working now. I uncommented the Memory Realm in server.xml and inserted the JDBC Realm in context.xml. This seemed to do the trick.
 
Hi goTerps88!

I have similar problem but in NetBeans 6.
CAn you post your server.xml ,to see how you change those lines,maybe it helps me to.

Thanks
 
Ensure that you comment out the memory realm. Then uncomment the JDBC Realm. I'm using oracle here but I believe they have an example for MySQL, et al.

Code:
<!--
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
      -->


<Realm  className="org.apache.catalina.realm.JDBCRealm"
             driverName="oracle.jdbc.driver.OracleDriver"
          connectionURL="jdbc:oracle:thin:@localhost:1521:XE"
         connectionName="hr" connectionPassword="password"
              userTable="USERS" userNameCol="USER_NAME" userCredCol="USER_PASS"
          userRoleTable="USER_ROLES" roleNameCol="ROLE_NAME" />
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top