Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: typo

A powerful, new feature introduced in Stripes v1.7 is the ability to easily create RESTful services using Stripes.  Stripes REST services have all of the capabilities that other Java REST frameworks have (JAX-RS, DWR, etc) but include all of the powerful features provided within Stripes – simple binding and validation, lifecycle management, and dead-simple convention-based implementation.  

 

Creating a simple RESTful service

The most effective way to show how to create a RESTful service using Stripes is to show our Calculator example implemented using RESTful action beansContinuing along the line of our basic Quickstart Calculator example, this page will show how to create the same kind of calculator using Stripes' RESTful ActionBeans.  Let's show you the code and then break it down piece by piece:

...

Using Stripes' native RestActionBean capabilities, there is no need to create custom Stripes plugins or interceptors to create a RESTful service.  Merely designate an ActionBean as being a "@RestActionBean" and your ActonBean ActionBean is transformed into a powerful RESTful service with all of the same capabilities that any other ActionBeans have.  This example is just a small taste of the capabilities of RestActionBeans.  Continue reading the documentation to discover all of the capabilities that RestActionBeans have to offer!