public static void addEnvContextParam ( Document doc , Element root ) { Element ctxParam = doc . createElement ( "context-param" ) ; Element paramName = doc . createElement ( "param-name" ) ; paramName . appendChild ( doc . createTextNode ( "shiroEnvironmentClass" ) ) ; ctxParam . appendChild ( paramName ) ; Element paramValue = doc . createElement ( "param-value" ) ; paramValue . appendChild ( doc . createTextNode ( "com.meltmedia.cadmium.servlets.shiro.WebEnvironment" ) ) ; ctxParam . appendChild ( paramValue ) ; addRelativeTo ( root , ctxParam , "listener" , false ) ; }
Adds a context parameter to a web . xml file to override where the shiro environment class .