public class WebXmlMappableAttributesRetriever extends XmlMappableAttributesRetriever
This MappableAttributesRetriever implementation reads the list of defined J2EE roles from a web.xml file. It's functionality is based on the XmlMappableAttributesRetriever base class.
Example on how to configure this MappableAttributesRetriever in the Spring configuration file:
<bean id="j2eeMappableRolesRetriever" class="org.springframework.security.ui.preauth.j2ee.WebXmlMappableAttributesRetriever"> <property name="webXmlInputStream"><bean factory-bean="webXmlResource" factory-method="getInputStream"/></property> </bean> <bean id="webXmlResource" class="org.springframework.web.context.support.ServletContextResource"> <constructor-arg><ref local="servletContext"/></constructor-arg> <constructor-arg><value>/WEB-INF/web.xml</value></constructor-arg> </bean> <bean id="servletContext" class="org.springframework.web.context.support.ServletContextFactoryBean"/>
XmlMappableAttributesRetriever.IgnoreCloseInputStream
Constructor and Description |
---|
WebXmlMappableAttributesRetriever()
Constructor setting the XPath expression to use
|
Modifier and Type | Method and Description |
---|---|
void |
setWebXmlInputStream(java.io.InputStream anInputStream) |
afterPropertiesSet, getMappableAttributes, setCloseInputStream, setXmlInputStream, setXpathExpression