Virgo supports the use of Spring framework and Spring DM (as supported by Gemini Blueprint) by application bundles.
Spring (and Spring DM) application context XML files should generally be placed in a bundle's META-INF/spring
directory, but
for a web application, these files must be placed in the WEB-INF
directory.
![]() | A common mistake |
---|---|
Placing a web application's Spring application context XML files in the |
To use Spring DM from a web application, the contextClass
servlet parameter and the servlet context listener
should be configured (in WEB-INF/web.xml
) like this:
<context-param> <param-name>contextClass</param-name> <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
Virgo has Gemini Blueprint built-in and thereby supports the OSGi Blueprint standard in addition to Spring DM.
For detailed information on Spring Framework, Spring DM, and Blueprint, please see Section 1.2, “References”.