Injection of ServletContext worked (as can be seen earlier in this thread).
But it turns out it wasn't needed because the Shiro AbstractFilter class[1] extends ServletContextSupport[2], and saves the ServletContext when receiving the FilterConfig[3]. So shiro filters already have the ServletContext (and automatically get the right one). References: [1] <https://github.com/apache/shiro/blob/master/web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java#L38> [2] <https://github.com/apache/shiro/blob/master/web/src/main/java/org/apache/shiro/web/servlet/ServletContextSupport.java#L28> [3] <https://github.com/apache/shiro/blob/master/web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java#L66> -- -- ------------------ OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/867dyxsx9e.fsf%40dod.no.