Wednesday, October 22, 2008

Custom ServletContext Scope Module

A new module has just been posted. It's a custom scope for a ServletContext. Typically a Spring singleton would be adequate for a single application, but this could be used to share a bean across multiple web applications if the servlet container has cross context support.


<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="servletContext">
<bean class="org.springbyexample.web.context.ServletContextScope" />
<property name="context" value="/advanced-form" />
</bean>
</entry>
</map>
</property>
</bean>

No comments: