MiltonServlet is a thin wrapper around HttpManager. It takes care of initialisation
and delegates requests to the HttpManager
The servlet API is hidden by the Milton API, however you can get access to
the underlying request and response objects from the static request and response
methods which use ThreadLocal variables
This spring aware servlet will load the spring context from a classpath
resource named /applicationContext.xml
It will then load a bean named milton.http.manager which must be of type
HttpManager.
An example applicationContext.xml might look like this
<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" />
<property name="maxAgeSeconds" value="3600" />
</bean>
<bean id="milton.fs.security.manager" class="com.ettrema.http.fs.NullSecurityManager" >
<property name="realm" value="aRealm" />
</bean>
<bean id="milton.response.handler" class="io.milton.http.DefaultResponseHandler" />
<bean id="milton.http.manager" class="io.milton.http.HttpManager">
<constructor-arg ref="milton.resource.factory" />
<constructor-arg ref="milton.response.handler" />
</bean>
</beans>