tree: 2df098b25249d0288748de9c35fd4c97a933119f [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.MD
examples/helloworld-spring-webapp/README.MD

Jersey Spring Integration Spring Helloworld WebApp Example

This example demonstrates how to create simple Jersey application that utilises Spring 3 DI features, packaged into WAR file.

Contents

The mapping of the URI path space is presented in the following table:

URI pathResource classHTTP methods
/jersey-helloJerseyResourceGET
/spring-helloSpringRequestResourceGET
/spring-singleton-helloSpringSingletonResourceGET

Application is configured by using web.xml, which registers javax.ws.rs.core.Application descendant to get classes and singletons from it (see class MyApplication).

Running the Example

Run the example as follows:

mvn clean package jetty:run

This deploys current example using Jetty web server. Once deployed, the application is ready to serve the following resources: