public static void addListener ( Document doc , Element root ) { Element listener = doc . createElement ( "listener" ) ; Element listenerClass = doc . createElement ( "listener-class" ) ; listener . appendChild ( listenerClass ) ; listenerClass . appendChild ( doc . createTextNode ( "org.apache.shiro.web.env.EnvironmentLoaderListener" ) ) ; addRelativeTo ( root , listener , "listener" , true ) ; }
Adds a shiro environment listener to load the shiro config file .