I'm configuring a DatasourceRealm
in Tomcat 6 configuring everything in META-INF/context.xml
. web.xml
seems to be configured correctly since login prompt is showing up.
Can someone help?
context.xml
<Context >
<Resource name="jdbc/auth" description="authentication" type="javax.sql.DataSource"
auth="Container" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
maxActive="25" maxIdle="10" maxWait="10000"
url="jdbc:sqlserver://SQLSERVER;databaseName=db;integratedSecurity=true"
validationQuery="select 1" />
<Realm className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="jdbc/auth" userTable="WebUsers" userNameCol="username"
userCredCol="password" userRoleTable="WebUserRoles" roleNameCol="role"
localDataSource="true"/>
</Context>
Stack
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context