I am sure someone has run across this before. I appreciate any help
or pointers to other threads about this.
in the logs I get this error:
un 19, 2007 1:01:24 PM org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context
What am I doing wrong?
I have a default server.xml. I configure everything using META-
INF/context.xml and WEB-INF/web.xml
context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="apppath" docBase="appname" reloadable="true"
antiJARLocking="true">
<Resource auth="Container"
driverClassName="org.gjt.mm.mysql.Driver"
maxActive="10"
maxIdle="5"
name="jdbc/gateway"
password="apassword"
type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/gateway?autoReconnect=true"
username="myusername"/>
<Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
dataSourceName="jdbc/gateway"
userTable="user"
userNameCol="Username"
userCredCol="Password"
userRoleTable="loginroleview"
roleNameCol="RoleName"/>
</Context>
web.xml: (has other things, but here is the auth part)
<security-constraint>
<web-resource-collection>
<web-resource-name>Secured Area</web-resource-name>
<url-pattern>/secure/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Administrator</role-name>
<role-name>User</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Gateway Secure Area</realm-name>
</login-config>
<security-role>
<description>
The role that is required
</description>
<role-name>Administrator</role-name>
</security-role>
<security-role>
<description>
The role that is required
</description>
<role-name>User</role-name>
</security-role>
</web-app>