Skip to content

Instantly share code, notes, and snippets.

@dannyduc
Created July 10, 2012 14:27
Show Gist options
  • Save dannyduc/3083626 to your computer and use it in GitHub Desktop.
Save dannyduc/3083626 to your computer and use it in GitHub Desktop.
Setting up a single Spring container context in the web.xml file.
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment