Repository: incubator-juneau-website Updated Branches: refs/heads/asf-site 05c3ae114 -> 72028d55a
Add info on child resources. Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/commit/72028d55 Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/72028d55 Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/72028d55 Branch: refs/heads/asf-site Commit: 72028d55ad799f7f8e85b54a2d5e8faa51ff1c1e Parents: 05c3ae1 Author: JamesBognar <[email protected]> Authored: Fri Mar 17 09:59:09 2017 -0400 Committer: JamesBognar <[email protected]> Committed: Fri Mar 17 09:59:09 2017 -0400 ---------------------------------------------------------------------- content/about.html | 78 ++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/72028d55/content/about.html ---------------------------------------------------------------------- diff --git a/content/about.html b/content/about.html index 8cdb32d..5524245 100644 --- a/content/about.html +++ b/content/about.html @@ -548,45 +548,6 @@ // additional convenience methods.</jc> } </p> - <p> - Navigatable hierarchies of REST resources are easy to set up either programmatically or through annotations: - </p> - <p class='bcode'> - <ja>@RestResource</ja>( - path=<js>"/"</js>, - children={ - HelloWorldResource.<jk>class</jk>, - SystemPropertiesResource.<jk>classv, - MethodExampleResource.<jk>class</jk>, - RequestEchoResource.<jk>class</jk>, - TempDirResource.<jk>class</jk>, - AddressBookResource.<jk>class</jk>, - SampleRemoteableServlet.<jk>class</jk>, - PhotosResource.<jk>class</jk>, - AtomFeedResource.<jk>class</jk>, - JsonSchemaResource.<jk>class</jk>, - SqlQueryResource.<jk>class</jk>, - TumblrParserResource.<jk>class</jk>, - CodeFormatterResource.<jk>class</jk>, - UrlEncodedFormResource.<jk>class</jk>, - ConfigResource.<jk>class</jk>, - LogsResource.<jk>class</jk>, - DockerRegistryResource.<jk>class</jk>, - ShutdownResource.<jk>class</jk> - } - ) - <jk>public class</jk> RootResources <jk>extends</jk> RestServletGroupDefault { <jc>/* No code needed! */</jc> } - </p> - <p> - The above resource when rendered in HTML shows how easy it is to discover and navigate to child resources using a browser: - </p> - <img class='bordered' src='images/Samples_RootResources.png'> - <p> - Resources can be nested arbitrarily deep. - The <ja>@RestResource</ja> and <ja>@RestMethod</ja> annotations can be applied to any classes, not just - servlets. The only requirement is that the top-level resource be a subclass of <code>RestServlet</code> as a hook into - the servlet container. - </p> <p> REST Java methods can return any of the following objects: POJOs, Readers, InputStreams, ZipFiles, Redirects, Streamables, and Writables. <br>Or add your own handlers for other types. @@ -671,6 +632,45 @@ <jk>return</jk> req.getSwagger(); } </p> + <p> + Navigatable hierarchies of REST resources are easy to set up either programmatically or through annotations: + </p> + <p class='bcode'> + <ja>@RestResource</ja>( + path=<js>"/"</js>, + children={ + HelloWorldResource.<jk>class</jk>, + SystemPropertiesResource.<jk>class</jk>, + MethodExampleResource.<jk>class</jk>, + RequestEchoResource.<jk>class</jk>, + TempDirResource.<jk>class</jk>, + AddressBookResource.<jk>class</jk>, + SampleRemoteableServlet.<jk>class</jk>, + PhotosResource.<jk>class</jk>, + AtomFeedResource.<jk>class</jk>, + JsonSchemaResource.<jk>class</jk>, + SqlQueryResource.<jk>class</jk>, + TumblrParserResource.<jk>class</jk>, + CodeFormatterResource.<jk>class</jk>, + UrlEncodedFormResource.<jk>class</jk>, + ConfigResource.<jk>class</jk>, + LogsResource.<jk>class</jk>, + DockerRegistryResource.<jk>class</jk>, + ShutdownResource.<jk>class</jk> + } + ) + <jk>public class</jk> RootResources <jk>extends</jk> RestServletGroupDefault { <jc>/* No code needed! */</jc> } + </p> + <p> + The above resource when rendered in HTML shows how easy it is to discover and navigate to child resources using a browser: + </p> + <img class='bordered' src='images/Samples_RootResources.png'> + <p> + Resources can be nested arbitrarily deep. + The <ja>@RestResource</ja> and <ja>@RestMethod</ja> annotations can be applied to any classes, not just + servlets. The only requirement is that the top-level resource be a subclass of <code>RestServlet</code> as a hook into + the servlet container. + </p> <p> Automatic error handling is provided for a variety of conditions: </p>
