Hi all I'm trying to use the jdbcRealm of Shiro, but I seem to be
configuring it incorrectly.

 

 

    <filter>

        <filter-name>ShiroFilter</filter-name>

 
<filter-class>org.apache.shiro.web.servlet.IniShiroFilter</filter-class>

        <init-param>

            <param-name>config</param-name>

            <param-value>

                [main]

                coreFreightRealm = org.apache.shiro.realm.jdbc.JdbcRealm

                coreFreightRealm.permissionsLookupEnabled = true

                coreFreightRealm.authenticationQuery = "SELECT password
FROM User WHERE userCode = ?"

                coreFreightRealm.userRolesQuery = "SELECT ActorCode FROM
UserActor WHERE UserCode = ?"

                coreFreightRealm.permissionsQuery = "SELECT ActorDesc
FROM actor WHERE ActorCode = ?"

 

                ds = com.microsoft.sqlserver.jdbc.SQLServerDataSource

                ds.serverName = databaseServer

                ds.user = user

                ds.password = password

                ds.portNumber = 1433

                ds.databaseName = development

                coreFreightRealm.dataSource = $ds

            </param-value>

        </init-param>

    </filter>

 

 

 

Can somebody see what I'm doing wrong?

 

And on another note would it be possible to use a jndi resource instead
of having to configure the database manually?

 

Thanks

Tim

Reply via email to