Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel2
outlinetrue

Overview

The REST Plugin

Excerpt

provides high level support for the implementation of RESTful resource based web applications

The REST plugin can cooperate with the Convention Plugin to support a zero configuration approach to declaring your actions and results, but you can always use the REST plugin with XML style configuration if you like.

If you prefer to see a working code example, instead of reading through an explanation, you can download the struts2 sample apps and check out the struts2-rest-showcase application, a complete WAR file, that demonstrates a simple REST web program.

...

The main functionality of the REST plugin lies in the interpretation of incoming request URL's according the RESTful rules. In the Struts 2 framework, this 'mapping' of request URL's to Actions is handled by in implementation of the ActionMapper interface. Out of the box, Struts 2 uses the DefaultActionMapper to map URL's to Actions via the logic you are probably already familiar with.

...