Created
June 6, 2012 16:37
-
-
Save sivaprasadreddy/2883125 to your computer and use it in GitHub Desktop.
RESTEasy+Spring 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
<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"> | |
<listener> | |
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> | |
</listener> | |
<listener> | |
<listener-class>org.jboss.resteasy.plugins.spring.SpringContextLoaderListener</listener-class> | |
</listener> | |
<servlet> | |
<servlet-name>Resteasy</servlet-name> | |
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>Resteasy</servlet-name> | |
<url-pattern>/rest/*</url-pattern> | |
</servlet-mapping> | |
<context-param> | |
<param-name>contextConfigLocation</param-name> | |
<param-value>classpath:applicationContext.xml</param-value> | |
</context-param> | |
<context-param> | |
<param-name>resteasy.servlet.mapping.prefix</param-name> | |
<param-value>/rest</param-value> | |
</context-param> | |
<context-param> | |
<param-name>resteasy.scan</param-name> | |
<param-value>true</param-value> | |
</context-param> | |
</web-app> |
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
<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"> | |
<listener> | |
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> | |
</listener> | |
<listener> | |
<listener-class>org.jboss.resteasy.plugins.spring.SpringContextLoaderListener</listener-class> | |
</listener> | |
<servlet> | |
<servlet-name>Resteasy</servlet-name> | |
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>Resteasy</servlet-name> | |
<url-pattern>/rest/*</url-pattern> | |
</servlet-mapping> | |
<context-param> | |
<param-name>contextConfigLocation</param-name> | |
<param-value>classpath:applicationContext.xml</param-value> | |
</context-param> | |
<context-param> | |
<param-name>resteasy.servlet.mapping.prefix</param-name> | |
<param-value>/rest</param-value> | |
</context-param> | |
<!--While using Spring integration set resteasy.scan to false or don't configure resteasy.scan parameter at all --> | |
<context-param> | |
<param-name>resteasy.scan</param-name> | |
<param-value>false</param-value> | |
</context-param> | |
</web-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Is there any particular reason for the follwoing statement, RestEasy doc says "Automatically scan WEB-INF/lib jars and WEB-INF/classes directory for both @Provider and JAX-RS resource classes (@path, @get, @post etc..) and register them"
Can you provide me more about this or refer to any documentation.
Raj