Created
October 19, 2011 20:52
-
-
Save eugenp/1299632 to your computer and use it in GitHub Desktop.
Bootstraping a web application with Spring 3.1 and Java based Configuration, part 1 - the web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
id="WebApp_ID" version="3.0"> | |
<display-name>rest</display-name> | |
<context-param> | |
<param-name>contextClass</param-name> | |
<param-value> | |
org.springframework.web.context.support.AnnotationConfigWebApplicationContext | |
</param-value> | |
</context-param> | |
<context-param> | |
<param-name>contextConfigLocation</param-name> | |
<param-value>org.rest.spring.root</param-value> | |
</context-param> | |
<listener> | |
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | |
</listener> | |
<servlet> | |
<servlet-name>rest</servlet-name> | |
<servlet-class> | |
org.springframework.web.servlet.DispatcherServlet | |
</servlet-class> | |
<init-param> | |
<param-name>contextClass</param-name> | |
<param-value> | |
org.springframework.web.context.support.AnnotationConfigWebApplicationContext | |
</param-value> | |
</init-param> | |
<init-param> | |
<param-name>contextConfigLocation</param-name> | |
<param-value>org.rest.spring.rest</param-value> | |
</init-param> | |
<load-on-startup>1</load-on-startup> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>rest</servlet-name> | |
<url-pattern>/api/*</url-pattern> | |
</servlet-mapping> | |
<welcome-file-list> | |
<welcome-file /> | |
</welcome-file-list> | |
</web-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist is used in:
http://www.baeldung.com/2011/10/20/bootstraping-a-web-application-with-spring-3-1-and-java-based-configuration-part-1/