Hi Guys,

I am trying to shiro in a web application. And i followed the instructions
on the docs and got it working. However i dont want to use the shiro.ini
anymore, I want to create a Ini class in my code and use it instead. I am
doing the following


<listener>
    
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class></listener

<context-param>
    <param-name>shiroEnvironmentClass</param-name>
    
<param-value>com.foo.bar.shiro.MyWebEnvironment</param-value></context-param>


And the class com.foo.bar.shiro.MyWebEnvironment looks like this

class MyWebEnvironment extends DefaultWebEnvironment implements
Initializable, Destroyable{

public init(){

Ini ini = new Ini()

WebSecurityManager securityManager = WebIniSecurityManagerFactory(ini);

setObject("securityManager", securityManager);

}

}

>From the logs I can see that Shiro gets loaded, but Shiro doesn't pick up
anything from the configuration. Please feel free to point me to the right
section of the docs and sorry for sending the same email twice, pressed the
Send button accidentally earlier :(

-- 
Thanks,
Diptanu Choudhury

Reply via email to