Bootstrap listener to startup and shutdown the web application's Shiro {@link WebEnvironment} at ServletContext startup and shutdown respectively. This class exists only toimplement the {@link ServletContextListener} interface. All 'real' logic is done in the parent{@link EnvironmentLoader} class.
Usage
Define the following in {@code web.xml}:
<listener> <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener
</listener-class> </listener>
Configuration options, such as the {@code WebEnvironment} class to instantiate as well as Shiro configurationresource locations are specified as {@code ServletContext} {@code context-param}s and are documented in the {@link EnvironmentLoader} JavaDoc.
Shiro Filter
This listener is almost always defined in conjunction with the {@link org.apache.shiro.web.servlet.ShiroFilter ShiroFilter} to ensure security operations for web requests. Pleasesee the {@link org.apache.shiro.web.servlet.ShiroFilter ShiroFilter} JavaDoc for more.
@see EnvironmentLoader
@see org.apache.shiro.web.servlet.ShiroFilter ShiroFilter
@since 1.2