I tried adding annotations. But I couldn't get it working. The problem is with the order in which filters are executed. With annotations, there seems to be no way to define the order of execution. Below is my code.
@WebFilter(urlPatterns = "/*", initParams = { @WebInitParam(name = "configPath", value = "classpath:shiro.ini") }, dispatcherTypes = {DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE, DispatcherType.ERROR}) public class MyFilter extends ShiroFilter Unless we define the filter in web.xml (which is the last option for me), I dont think this will work. Is there any other way we can associate the subject to session? Thanks again for your valuable suggestion. -- Sent from: http://shiro-user.582556.n2.nabble.com/