Package io.milton.servlet
Class SpringResourceFactoryFactory
java.lang.Object
io.milton.servlet.SpringResourceFactoryFactory
- All Implemented Interfaces:
MiltonConfigurator
Specify this class name in your init parameter: resource.factory.factory.class
This will load applicationContext.xml from the classpath and use that to
load the ResourceFactory from bean id: milton.resource.factory
Example web.xml
<servlet>
<servlet-name>milton</servlet-name>
<servlet-class>io.milton.http.MiltonServlet</servlet-class>
<init-param>
<param-name>resource.factory.factory.class</param-name>
<param-value>io.milton.http.SpringResourceFactoryFactory</param-value>
</init-param>
</servlet>
Example applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="milton.resource.factory" class="com.ettrema.http.fs.FileSystemResourceFactory">
<property name="securityManager" ref="milton.fs.security.manager" />
</bean>
<bean id="milton.response.handler" class="com.ettrema.http.DefaultResponseHandler" />
<bean id="milton.fs.security.manager" class="com.ettrema.http.fs.NullSecurityManager" >
<property name="realm" value="aRealm" />
</bean>
</beans>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SpringResourceFactoryFactory
public SpringResourceFactoryFactory()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceMiltonConfigurator- Throws:
jakarta.servlet.ServletException
-
shutdown
public void shutdown()Description copied from interface:MiltonConfiguratorcalled on destroy from the servlet- Specified by:
shutdownin interfaceMiltonConfigurator
-