If you launch your spring application on an application server, you can use a listener inside of the web.xml to start your spring container.
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:context.xml</param-value>
</context-param>
Another example: If you want to use spring in a blueprint OSGi environment, the blueprint extender starts all contexts in META-INF/spring or OSGI-INF/blueprint for you.