This webapp demonstrates a technique to access resources with hierarchical relationships in Struts 2.
The model is a Book with a list of Chapters. Each Book has a unique URI: eg. /book/1 (book #1)
Each chapter also has a unique URI: eg. /book/1/chapter/2 (chapter #2 in book #1)
Following Struts2 conventions, the list of books and list of chapters in a book are also available: eg. /book (list of books) eg. /book/1/chapter (list of chapters in book #1)
Commentary
This webapp demonstrates a technique to access resources with hierarchical relationships in Struts 2.
The model is a Book with a list of Chapters. Each Book has a unique URI:
eg. /book/1 (book #1)
Each chapter also has a unique URI:
eg. /book/1/chapter/2 (chapter #2 in book #1)
Following Struts2 conventions, the list of books and list of chapters in a book are also available:
eg. /book (list of books)
eg. /book/1/chapter (list of chapters in book #1)