The Stapler library

Stapler is a library used by Jenkins that allows objects to be mapped to URLs automatically. It solves the problem of mapping relative URLs in complex applications such as Expression Language (EL) (http://www-106.ibm.com/developerworks/java/library/j-jstl0211.html). It takes an object and a URL and then evaluates the URL against the object. It repeats this process until it hits either a static resource, a view (such as JSP, Jelly, Groovy, and so on), or an action method. The following diagram shows this process in more detail:

(Credits: http://stapler.kohsuke.org/what-is.html)

As shown in the preceding diagram, the root object is mapped to the URL, while every other object is mapped as a separate path until a resource is found.