juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Javadoc updates.
Date Wed, 31 Jan 2018 16:59:54 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new b3f40bb  Javadoc updates.
b3f40bb is described below

commit b3f40bbf02e82205a871b0ebe4c9d9e2018dfb49
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Wed Jan 31 08:59:28 2018 -0800

    Javadoc updates.
---
 juneau-doc/src/main/javadoc/overview.html          | 219 +++++++--
 .../juneau/microservice/resources/ConfigEdit.html  |   2 +-
 .../apache/juneau/rest/test/NlsResource.properties |  22 +-
 .../org/apache/juneau/rest/ReaderResource.java     |   3 +-
 .../org/apache/juneau/rest/RequestHeaders.java     |  15 +
 .../org/apache/juneau/rest/RequestPathMatch.java   |  82 +++-
 .../java/org/apache/juneau/rest/RestContext.java   |  62 ++-
 .../org/apache/juneau/rest/RestParamDefaults.java  |   4 +-
 .../java/org/apache/juneau/rest/RestRequest.java   | 542 +++++++++++++++++----
 .../java/org/apache/juneau/rest/RestServlet.java   |  66 +--
 .../org/apache/juneau/rest/RestServletDefault.java |   4 +-
 .../juneau/rest/annotation/RestResource.java       |   6 +-
 .../org/apache/juneau/rest/vars/RequestVar.java    |  16 +-
 13 files changed, 831 insertions(+), 212 deletions(-)

diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index 95b3393..355cb3f 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -4965,14 +4965,134 @@
 			<a id="juneau-rest-server.Children"></a>
 			<h4 class='topic' onclick='toggle(this)'>3.1.3.1 - RestServlet</h4>
 			<div class='topic'>
-				TODO
+				<p>
+					The {@link org.apache.juneau.rest.RestServlet} class is the entry point for your REST resources.
+					<br>It extends directly from <l>HttpServlet</l> and is deployed like any other servlet.
+				</p>
+				<p>
+					When the servlet <l>init()</l> method is called, it triggers the code to find and process the <l>@RestResource</l>
+					annotations on that class and all child classes.
+					<br>These get constructed into a {@link org.apache.juneau.rest.RestContext} object that holds all the configuration
+					information about your resource in a read-only object.
+				</p>
+				<p>
+					Most developers are not going to be using the <l>RestServlet</l> class itself, and instead will
+					extend from one of the preconfigured default servlets such as {@link org.apache.juneau.rest.RestServletDefault}.
+					<br>The <l>RestServlet</l> class by itself is not configured with any serializers and parsers, and therefore
+					not very useful on it's own.
+					<br>However, the class does provide a couple of convenience methods to be aware of:
+				</p>
+				<ul class='doctree'>
+					<li class='jac'>{@link org.apache.juneau.rest.RestServlet}
+					<ul>
+						<li class='jf'>{@link org.apache.juneau.rest.RestServlet#log(Level,String,Object...) log(Level,String,Object...)}
+						<li class='jf'>{@link org.apache.juneau.rest.RestServlet#log(Level,Throwable,String,Object...) log(Level,Throwable,String,Object...)}
+						<li class='jf'>{@link org.apache.juneau.rest.RestServlet#getContext() getContext()}
+					</ul>
+				</ul>
+				<p>
+					Since this is a servlet, you also have the ability to intercept calls to the <l>init</l> and <l>service</l> methods
+					in your subclass.
 			</div>
 
 			<!-- ======================================================================================================== -->
 			<a id="juneau-rest-server.Children"></a>
 			<h4 class='topic' onclick='toggle(this)'>3.1.3.2 - RestServletDefault</h4>
 			<div class='topic'>
-				TODO
+				<p>
+					The {@link org.apache.juneau.rest.RestServletDefault} class is a subclass of {@link org.apache.juneau.rest.RestServlet}
+					preconfigured with the following:
+				</p>
+				<ul class='spaced-list'>
+					<li>A default set of serializers and parsers (pretty much all of them except for the RDF ones).
+					<li>Some basic HTML boilerplate for the HTML representation of your POJOs.
+					<li>Support for auto-generated Swagger documentation through OPTIONS page requests.
+					<li>Configuration of default CSS stylesheets.
+				</ul>
+				<p>
+					The entirety of the class is shown below.
+					<br>You should notice that very little code is being used and everything is configurable through
+					annotations:
+				</p>
+				<p class='bcode'>
+	<ja>@RestResource</ja>(
+		serializers={
+			HtmlDocSerializer.<jk>class</jk>,
+			HtmlStrippedDocSerializer.<jk>class</jk>,
+			HtmlSchemaDocSerializer.<jk>class</jk>,
+			JsonSerializer.<jk>class</jk>,
+			JsonSerializer.Simple.<jk>class</jk>,
+			JsonSchemaSerializer.<jk>class</jk>,
+			XmlDocSerializer.<jk>class</jk>,
+			XmlSchemaDocSerializer.<jk>class</jk>,
+			UonSerializer.<jk>class</jk>,
+			UrlEncodingSerializer.<jk>class</jk>,
+			MsgPackSerializer.<jk>class</jk>,
+			SoapXmlSerializer.<jk>class</jk>,
+			PlainTextSerializer.<jk>class</jk>
+		},
+		parsers={
+			JsonParser.<jk>class</jk>,
+			XmlParser.<jk>class</jk>,
+			HtmlParser.<jk>class</jk>,
+			UonParser.<jk>class</jk>,
+			UrlEncodingParser.<jk>class</jk>,
+			MsgPackParser<jk>.class</jk>,
+			PlainTextParser.<jk>class</jk>
+		},
+		properties={
+			<jc>// URI-resolution is disabled by default.  Need to enable it.</jc>
+			<ja>@Property</ja>(name=<jsf>SERIALIZER_uriResolution</jsf>, value=<js>"ROOT_RELATIVE"</js>)
+		},
+		allowedMethodParams=<js>"OPTIONS"</js>,
+		htmldoc=<ja>@HtmlDoc</ja>(
+			header={
+				<js>"&lt;h1&gt;$R{resourceTitle}&lt;/h1&gt;"</js>,
+				<js>"&lt;h2&gt;$R{methodSummary,resourceDescription}&lt;/h2&gt;"</js>,
+				<js>"&lt;a href='http://juneau.apache.org'&gt;&lt;img src='$U{servlet:/htdocs/juneau.png}' style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;&lt;/a&gt;"</js>
+			},
+			stylesheet=<js>"servlet:/styles/light.css"</js>,
+			head={
+				<js>"&lt;link rel='icon' href='$U{servlet:/htdocs/juneau.png}'/&gt;"</js>
+			}
+		),
+	
+		<jc>// These are static files that are served up by the servlet under the specified sub-paths.
+		// For example, "/servletPath/htdocs/javadoc.css" resolves to the file "[servlet-package]/htdocs/javadoc.css"</jc>
+		staticFiles={<js>"htdocs:htdocs"</js>,<js>"styles:styles"</js>}
+	)
+	<jk>public abstract class</jk> RestServletDefault <jk>extends</jk> RestServlet {
+	
+		<jd>/**
+		 * [OPTIONS /*] - Show resource options.
+		 * 
+		 * @param req The HTTP request.
+		 * @return A bean containing the contents for the OPTIONS page.
+		 */</jd>
+		<ja>@RestMethod</ja>(name=<jsf>OPTIONS</jsf>, path=<js>"/*"</js>,
+			htmldoc=<ja>@HtmlDoc</ja>(
+				navlinks={
+					<js>"back: servlet:/"</js>,
+					<js>"json: servlet:/?method=OPTIONS&amp;Accept=text/json&amp;plainText=true"</js>
+				},
+				aside=<js>"NONE"</js>
+			),
+			summary=<js>"Swagger documentation",</js>
+			description=<js>"Auto-generated swagger documentation for this resource"</js>
+		)
+		<jk>public</jk> Swagger getOptions(RestRequest req) {
+			<jk>return</jk> req.getSwagger();
+		}
+	}
+				</p>
+				<p>
+					Your top-level resource will simply extend from this class, as shown in the Hello World example
+					from a couple sections back.
+				</p>
+				<p>
+					There's a lot going on in this class.
+					<br>But not to worry, the details will be described later.
+				</p>
 			</div>
 
 			<!-- ======================================================================================================== -->
@@ -5486,7 +5606,35 @@
 			<a id="juneau-rest-server.RestRequest"></a>
 			<h4 class='topic' onclick='toggle(this)'>3.1.6.2 - RestRequest</h4>
 			<div class='topic'>
-				TODO
+				<p>
+					The {@link org.apache.juneau.rest.RestRequest} object is an extension of the <l>HttpServletRequest</l> class
+					with various built-in convenience methods for use in building REST interfaces.
+					<br>It can be accessed by passing it as a parameter on your REST Java method:
+				</p>
+				<p class='bcode'>
+	<ja>@RestMethod</ja>(...)
+	<jk>public</jk> Object myMethod(RestRequest req) {...}			
+				</p>
+				<p>
+					There are many useful methods on this object, but the main ones are shown below:
+				</p>
+				<ul class='doctree'>
+					<li class='jc'>{@link org.apache.juneau.rest.RestRequest} 
+					<ul>
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getHeaders() getHeaders()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getQuery() getQuery()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getFormData() getFormData()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getBody() getBody()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getPathMatch() getPathMatch()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getLogger() getLogger()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getInfoProvider() getInfoProvider()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getSwagger() getSwagger()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getConfigFile() getConfigFile()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getVarResolverSession() getVarResolverSession()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getMessageBundle() getMessageBundle()}
+						<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getClasspathReaderResource(String,boolean,MediaType) getClasspathReaderResource(String,boolean,MediaType)}
+					</ul>
+				</ul>
 			</div>
 			
 			<!-- ======================================================================================================== -->
@@ -5525,6 +5673,13 @@
 			</div>
 
 			<!-- ======================================================================================================== -->
+			<a id="juneau-rest-server.RequestPathMatch"></a>
+			<h4 class='topic' onclick='toggle(this)'>3.1.6.X - RequestPathMatch</h4>
+			<div class='topic'>
+				TODO
+			</div>
+
+			<!-- ======================================================================================================== -->
 			<a id="juneau-rest-server.MethodReturnTypes"></a>
 			<h4 class='topic' onclick='toggle(this)'>3.1.6.8 - Method Return Types</h4>
 			<div class='topic'>
@@ -6806,8 +6961,8 @@
 							<li><l>$R{pathInfo}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getPathInfo()}.
 							<li><l>$R{requestParentURI}</l> - Value returned by {@link org.apache.juneau.UriContext#getRootRelativePathInfoParent()}.
 							<li><l>$R{requestURI}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getRequestURI()}.
-							<li><l>$R{servletDescription}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getServletDescription()}.
-							<li><l>$R{servletTitle}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getServletTitle()}.
+							<li><l>$R{resourceDescription}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getResourceDescription()}.
+							<li><l>$R{resourceTitle}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getResourceTitle()}.
 							<li><l>$R{servletParentURI}</l> - Value returned by {@link org.apache.juneau.UriContext#getRootRelativeServletPathParent()}.
 							<li><l>$R{servletPath}</l> - Value returned by {@link org.apache.juneau.rest.RestRequest#getServletPath()}.
 							<li><l>$R{servletURI}</l> - Value returned by {@link org.apache.juneau.UriContext#getRootRelativeServletPath()}.
@@ -7212,20 +7367,20 @@
 			</p>
 		 	<ul class='doctree'>
 		 		<li class='jm'>
-		 			{@link org.apache.juneau.rest.RestRequest#getServletTitle()}
+		 			{@link org.apache.juneau.rest.RestRequest#getResourceTitle()}
 		 		<li class='jm'>
-		 			{@link org.apache.juneau.rest.RestRequest#getServletDescription()}
+		 			{@link org.apache.juneau.rest.RestRequest#getResourceDescription()}
 		 	</ul>
 			<p>
-		 		They are also made available as the request string variables <js>"$R{servletTitle}"</js> and 
-		 		<js>"$R{servletDescription}"</js>.
+		 		They are also made available as the request string variables <js>"$R{resourceTitle}"</js> and 
+		 		<js>"$R{resourceDescription}"</js>.
 		 		These variable facilitate the localized label and descriptions on the HTML pages when using 
 		 		{@link org.apache.juneau.rest.RestServletDefault}:
 			</p>
 			<p class='bcode'>
 	<ja>@RestResource</ja>(
-		pageTitle=<js>"The title for this page is $R{servletTitle}"</js>,
-		pageText=<js>"The description for this page is $R{servletDescription}"</js>
+		pageTitle=<js>"The title for this page is $R{resourceTitle}"</js>,
+		pageText=<js>"The description for this page is $R{resourceDescription}"</js>
 	)
 	<jk>public abstract class</jk> RestServletDefault <jk>extends</jk> RestServlet {
 		 	</p>
@@ -9360,8 +9515,8 @@
 			</p>
 			<p>
 				The <l>title</l> and <l>description</l> keys identify the localized values
-				return by the {@link org.apache.juneau.rest.RestRequest#getServletTitle()} and 
-				{@link org.apache.juneau.rest.RestRequest#getServletDescription()} methods.
+				return by the {@link org.apache.juneau.rest.RestRequest#getResourceTitle()} and 
+				{@link org.apache.juneau.rest.RestRequest#getResourceDescription()} methods.
 			</p>
 			<p>
 				The <l>children</l> annotation defines the child resources of this router resource.
@@ -9880,8 +10035,8 @@
 		<xt>&lt;/script&gt;</xt> 
 	<xt>&lt;/head&gt;</xt> 
 	<xt>&lt;body&gt;</xt> 
-		<xt>&lt;h1&gt;</xt>$R{servletTitle}<xt>&lt;/h1&gt;</xt> 
-		<xt>&lt;h2&gt;</xt>$R{servletDescription}<xt>&lt;/h2&gt;</xt> 
+		<xt>&lt;h1&gt;</xt>$R{resourceTitle}<xt>&lt;/h1&gt;</xt> 
+		<xt>&lt;h2&gt;</xt>$R{resourceDescription}<xt>&lt;/h2&gt;</xt> 
 		<xt>&lt;div</xt> <xa>class</xa>=<xs>'data'</xs><xt>&gt;</xt> 
 			<xt>&lt;form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>target</xa>=<xs>'buff'</xs><xt>&gt;</xt> 
 				<xt>&lt;table&gt;</xt> 
@@ -9928,9 +10083,9 @@
 			</p>
 			<p>
 				The <l>$R</l> variables are request string variables.  
-				In this case, <l>$R{servletTitle}</l> and <l>$R{servletDescription}</l> resolve to the values returned by 
-				{@link org.apache.juneau.rest.RestRequest#getServletTitle()} and 
-				{@link org.apache.juneau.rest.RestRequest#getServletDescription()}.
+				In this case, <l>$R{resourceTitle}</l> and <l>$R{resourceDescription}</l> resolve to the values returned by 
+				{@link org.apache.juneau.rest.RestRequest#getResourceTitle()} and 
+				{@link org.apache.juneau.rest.RestRequest#getResourceDescription()}.
 			</p>
 			<p>
 				Pointing a browser to the resource shows the following:
@@ -11469,8 +11624,8 @@
 		<xt>&lt;/style&gt;</xt>
 	<xt>&lt;/head&gt;</xt>
 	<xt>&lt;body&gt;</xt>
-		<xt>&lt;h1&gt;</xt>$R{servletTitle}<xt>&lt;/h1&gt;</xt>
-		<xt>&lt;h2&gt;</xt>$R{servletDescription}<xt>&lt;/h2&gt;</xt>
+		<xt>&lt;h1&gt;</xt>$R{resourceTitle}<xt>&lt;/h1&gt;</xt>
+		<xt>&lt;h2&gt;</xt>$R{resourceDescription}<xt>&lt;/h2&gt;</xt>
 		<xt>&lt;div</xt> <xa>class</xa>=<xs>'data'</xs><xt>&gt;</xt>
 			<xt>&lt;form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}/upload'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>target</xa>=<xs>'buff'</xs> <xa>enctype</xa>=<xs>"multipart/form-data"</xs><xt>&gt;</xt>
 				<xt>&lt;input</xt> <xa>name</xa>=<xs>"contents"</xs> <xa>type</xa>=<xs>"file"</xs><xt>&gt;</xt><xt>&lt;button</xt> <xa>type</xa>=<xs>"submit"</xs><xt>&gt;</xt>Submit<xt>&lt;/button&gt;</xt>
@@ -12407,7 +12562,7 @@
 		<xt>&lt;/style&gt;</xt> 
 	<xt>&lt;/head&gt;</xt> 
 	<xt>&lt;body&gt;</xt> 
-		<xt>&lt;h1&gt;</xt>$R{servletTitle}<xt>&lt;/h1&gt;</xt> 
+		<xt>&lt;h1&gt;</xt>$R{resourceTitle}<xt>&lt;/h1&gt;</xt> 
 		<xt>&lt;h2&gt;</xt>Edit config file<xt>&lt;/h2&gt;</xt> 
 		<xt>&lt;p</xt> <xa>class</xa>=<xs>'links'</xs><xt>&gt;</xt><xt>&lt;a</xt> <xa>href</xa>=<xs>'$R{requestParentURI}'</xs><xt>&gt;</xt>up<xt>&lt;/a&gt;</xt> - <xt>&lt;a</xt> <xa>href=<xs>'$R{servletURI}?method</xa>=OPTIONS'</xs><xt>&gt;</xt>options<xt>&lt;/a&gt;</xt><xt>&lt;/p&gt;</xt> 
 		<xt>&lt;form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>enctype</xa>=<xs>'application/x-www-form-urlencoded'</xs><xt>&gt;</xt> 
@@ -12897,10 +13052,10 @@
 							<li><js>"pathInfo"</js> - Value returned by {@link org.apache.juneau.rest.RestRequest#getPathInfo()}
 							<li><js>"requestParentURI"</js> - Value returned by {@link org.apache.juneau.UriContext#getRootRelativePathInfoParent()}
 							<li><js>"requestURI"</js> - Value returned by {@link org.apache.juneau.rest.RestRequest#getRequestURI()}
-							<li><js>"servletDescription"</js> - Value returned by {@link org.apache.juneau.rest.RestRequest#getServletDescription()}
+							<li><js>"resourceDescription"</js> - Value returned by {@link org.apache.juneau.rest.RestRequest#getResourceDescription()}
+							<li><js>"resourceTitle"</js> - See {@link org.apache.juneau.rest.RestRequest#getResourceTitle()}
 							<li><js>"servletParentURI"</js> - Value returned by {@link org.apache.juneau.UriContext#getRootRelativeServletPathParent()}
 							<li><js>"servletPath"</js> - See {@link org.apache.juneau.rest.RestRequest#getServletPath()}
-							<li><js>"servletTitle"</js> - See {@link org.apache.juneau.rest.RestRequest#getServletTitle()}
 							<li><js>"servletURI"</js> - See {@link org.apache.juneau.UriContext#getRootRelativeServletPath()}
 							<li><js>"siteName"</js> - See {@link org.apache.juneau.rest.RestRequest#getSiteName()}
 						</ul>
@@ -13942,8 +14097,8 @@
 				<p class='bcode'>
 	htmldoc=<ja>@HtmlDoc</ja>(
 		header={
-			<js>"&lt;h1&gt;$R{servletTitle}&lt;/h1&gt;"</js>,
-			<js>"&lt;h2&gt;$R{methodSummary,servletDescription}&lt;/h2&gt;"</js>,
+			<js>"&lt;h1&gt;$R{resourceTitle}&lt;/h1&gt;"</js>,
+			<js>"&lt;h2&gt;$R{methodSummary,resourceDescription}&lt;/h2&gt;"</js>,
 			<js>"&lt;a href='http://juneau.apache.org'&gt;&lt;img src='$U{servlet:/htdocs/juneau.png}' style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/&gt;&lt;/a&gt;"</js>
 		}
 	)
@@ -15662,7 +15817,7 @@
 				overriding the new <code><del>RestServlet.handleNotFound(int,RestRequest,RestResponse)</del></code> method.
 			<li>New {@link org.apache.juneau.rest.RestRequest} methods: 
 				<ul>
-					<li>{@link org.apache.juneau.rest.RestRequest#resolveVars(String)}
+					<li><code><del>RestRequest.resolveVars(String)</del></code>
 					<li><code>RestRequest.getVarResource(String)</code>
 					<li><code><del>RestRequest.getConfig()</del></code>
 				</ul>
@@ -15821,8 +15976,8 @@
 							<li><code><del>RestRequest.getPathRemainderUndecoded()</del></code>
 							<li><code><del>RestRequest.getTrimmedRequestURI()</del></code>
 							<li><code><del>RestRequest.getTrimmedRequestURL()</del></code>
-							<li>{@link org.apache.juneau.rest.RestRequest#getServletTitle()}
-							<li>{@link org.apache.juneau.rest.RestRequest#getServletDescription()}
+							<li><code><del>RestRequest.getServletTitle()</del></code>
+							<li><code><del>RestRequest.getServletDescription()</del></code>
 							<li>{@link org.apache.juneau.rest.RestRequest#getMethodDescription()}
 						</ul>
 					<li>Behavior changes to {@link org.apache.juneau.rest.RestRequest#getPathInfo()} to follow Servlet specs.
@@ -15836,8 +15991,8 @@
 				<ul>
 					<li><code>$R{contextPath}</code> - Returns value from {@link org.apache.juneau.rest.RestRequest#getContextPath()}
 					<li><code>$R{methodDescription}</code> - Returns value from {@link org.apache.juneau.rest.RestRequest#getMethodDescription()}
-					<li><code>$R{servletTitle}</code> - Returns value from {@link org.apache.juneau.rest.RestRequest#getServletTitle()}
-					<li><code>$R{servletDescription}</code> - Returns value from {@link org.apache.juneau.rest.RestRequest#getServletDescription()}
+					<li><code>$R{resourceTitle}</code> - Returns value from <code><del>RestRequest.getServletTitle()</del></code>
+					<li><code>$R{resourceDescription}</code> - Returns value from <code><del>RestRequest.getServletDescription()</del></code>
 					<li><code>$R{trimmedRequestURI}</code> - Returns value from <code><del>RestRequest.getTrimmedRequestURI()</del></code>
 					<li><code>$E{var}</code> - Environment variables.
 				</ul>
@@ -15845,8 +16000,8 @@
 			<li>{@link org.apache.juneau.rest.RestServletDefault} and <code><del>RestServletJenaDefault</del></code> now provide default HTML titles
 				and descriptions:
 				<p class='bcode'>
-	<ja>@Property</ja>(name=<jsf>HTMLDOC_title</jsf>, value=<js>"$R{servletTitle}"</js>),
-	<ja>@Property</ja>(name=<jsf>HTMLDOC_description</jsf>, value=<js>"$R{servletDescription}"</js>)
+	<ja>@Property</ja>(name=<jsf>HTMLDOC_title</jsf>, value=<js>"$R{resourceTitle}"</js>),
+	<ja>@Property</ja>(name=<jsf>HTMLDOC_description</jsf>, value=<js>"$R{resourceDescription}"</js>)
 				</p>
 			<li>Options pages on {@link org.apache.juneau.rest.RestServletDefault} and <code><del>RestServletJenaDefault</del></code> now provide default descriptions and back links:
 				and descriptions:
diff --git a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigEdit.html b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigEdit.html
index f02609b..cd1ec81 100755
--- a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigEdit.html
+++ b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigEdit.html
@@ -22,7 +22,7 @@
 	</style>
 </head>
 <body>
-	<h3 class='title'>$R{servletTitle}</h3>
+	<h3 class='title'>$R{resourceTitle}</h3>
 	<h5 class='description'>Edit config file</h5>
 	<p class='links'><a href='$R{requestParentURI}'>up</a> - <a href='$R{servletURI}?method=OPTIONS'>options</a></p>
 	<form id='form' action='$R{servletURI}' method='POST' enctype='application/x-www-form-urlencoded'>	
diff --git a/juneau-microservice/juneau-microservice-test/src/main/resources/org/apache/juneau/rest/test/NlsResource.properties b/juneau-microservice/juneau-microservice-test/src/main/resources/org/apache/juneau/rest/test/NlsResource.properties
index 1c820fd..bb638b5 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/resources/org/apache/juneau/rest/test/NlsResource.properties
+++ b/juneau-microservice/juneau-microservice-test/src/main/resources/org/apache/juneau/rest/test/NlsResource.properties
@@ -66,20 +66,20 @@ foo = $L{bar}
 bar = baz
 
 Test5.title = $L{foo2}
-Test5.description = $R{servletTitle}
-Test5.test5.summary = $R{servletTitle}
+Test5.description = $R{resourceTitle}
+Test5.test5.summary = $R{resourceTitle}
 test5.parameters = [\
-		{in:"path",name:"a",description:"$R{servletTitle}"},\
-		{in:"query",name:"b",description:"$R{servletTitle}"},\
-		{in:"body",description:"$R{servletTitle}"},\
-		{in:"header",name:"D",description:"$R{servletTitle}"},\
-		{in:"path",name:"a2",description:"$R{servletTitle}"},\
-		{in:"query",name:"b2",description:"$R{servletTitle}"},\
-		{in:"header",name:"D2",description:"$R{servletTitle}"}\
+		{in:"path",name:"a",description:"$R{resourceTitle}"},\
+		{in:"query",name:"b",description:"$R{resourceTitle}"},\
+		{in:"body",description:"$R{resourceTitle}"},\
+		{in:"header",name:"D",description:"$R{resourceTitle}"},\
+		{in:"path",name:"a2",description:"$R{resourceTitle}"},\
+		{in:"query",name:"b2",description:"$R{resourceTitle}"},\
+		{in:"header",name:"D2",description:"$R{resourceTitle}"}\
 	]
 test5.responses = {\
-		200:{description:"foo$R{servletTitle}foo$R{servletTitle}foo"},\
-		201:{description:"$R{servletTitle}"}\
+		200:{description:"foo$R{resourceTitle}foo$R{resourceTitle}foo"},\
+		201:{description:"$R{resourceTitle}"}\
 	}
 Test5.foo2 = $L{bar2}
 Test5.bar2 = baz2
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/ReaderResource.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/ReaderResource.java
index 2bc7aa3..da111e1 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/ReaderResource.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/ReaderResource.java
@@ -20,12 +20,11 @@ import java.util.*;
 import org.apache.juneau.*;
 import org.apache.juneau.http.*;
 import org.apache.juneau.internal.*;
-import org.apache.juneau.rest.annotation.*;
 import org.apache.juneau.rest.response.*;
 import org.apache.juneau.svl.*;
 
 /**
- * Represents the contents of a text file with convenience methods for resolving {@link Parameter @Parameter} variables and adding
+ * Represents the contents of a text file with convenience methods for resolving SVL variables and adding
  * HTTP response headers.
  * 
  * <p>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestHeaders.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestHeaders.java
index 438b055..d403bad 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestHeaders.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestHeaders.java
@@ -85,6 +85,21 @@ public class RequestHeaders extends TreeMap<String,String[]> {
 		}
 		return this;
 	}
+	
+	/**
+	 * Adds a default header value on this request.
+	 * 
+	 * @param name 
+	 * 	The header name.  
+	 * @param value
+	 * 	The header value.  
+	 * 	<br>Converted to a String using <code>toString()</code>.
+	 * 	<br>Ignored if value is <jk>null</jk> or blank.
+	 * @return This object (for method chaining).
+	 */
+	public RequestHeaders addDefault(String name, Object value) {
+		return addDefault(Collections.singletonMap(name, value));
+	}
 
 	/**
 	 * Adds a set of header values to this object.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestPathMatch.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
index 7709592..eec2bc3 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
@@ -76,6 +76,39 @@ public class RequestPathMatch extends TreeMap<String,String> {
 	}
 
 	/**
+	 * Returns the specified path parameter converted to a String.
+	 * 
+	 * @param name The path variable name.
+	 * @return The parameter value.
+	 * @throws ParseException
+	 */
+	public String getString(String name) throws ParseException {
+		return parse(parser, name, beanSession.string());
+	}
+
+	/**
+	 * Returns the specified path parameter converted to an integer.
+	 * 
+	 * @param name The path variable name.
+	 * @return The parameter value.
+	 * @throws ParseException
+	 */
+	public int getInt(String name) throws ParseException {
+		return parse(parser, name, beanSession.getClassMeta(int.class));
+	}
+
+	/**
+	 * Returns the specified path parameter converted to a boolean.
+	 * 
+	 * @param name The path variable name.
+	 * @return The parameter value.
+	 * @throws ParseException
+	 */
+	public boolean getBoolean(String name) throws ParseException {
+		return parse(parser, name, beanSession.getClassMeta(boolean.class));
+	}
+
+	/**
 	 * Returns the specified path parameter converted to a POJO.
 	 * 
 	 * <p>
@@ -107,7 +140,23 @@ public class RequestPathMatch extends TreeMap<String,String> {
 	 * @throws ParseException
 	 */
 	public <T> T get(String name, Class<T> type) throws ParseException {
-		return parse(name, beanSession.getClassMeta(type));
+		return get(parser, name, type);
+	}
+
+	/**
+	 * Same as {@link #get(String, Class)} but allows you to override the part parser.
+	 * 
+	 * @param parser
+	 * 	The parser to use for parsing the string value.
+	 * 	<br>If <jk>null</jk>, uses the part parser defined on the servlet/method. 
+	 * @param name The attribute name.
+	 * @param type The class type to convert the attribute value to.
+	 * @param <T> The class type to convert the attribute value to.
+	 * @return The attribute value converted to the specified class type.
+	 * @throws ParseException
+	 */
+	public <T> T get(HttpPartParser parser, String name, Class<T> type) throws ParseException {
+		return parse(parser, name, beanSession.getClassMeta(type));
 	}
 
 	/**
@@ -150,11 +199,38 @@ public class RequestPathMatch extends TreeMap<String,String> {
 	 * @throws ParseException
 	 */
 	public <T> T get(String name, Type type, Type...args) throws ParseException {
-		return (T)parse(name, beanSession.getClassMeta(type, args));
+		return get(parser, name, type, args);
 	}
 
+	/**
+	 * Same as {@link #get(String, Type, Type...)} but allows you to override the part parser.
+	 * 
+	 * @param parser
+	 * 	The parser to use for parsing the string value.
+	 * 	<br>If <jk>null</jk>, uses the part parser defined on the servlet/method. 
+	 * @param name The attribute name.
+	 * @param type
+	 * 	The type of object to create.
+	 * 	<br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+	 * 	{@link GenericArrayType}
+	 * @param args
+	 * 	The type arguments of the class if it's a collection or map.
+	 * 	<br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+	 * 	{@link GenericArrayType}
+	 * 	<br>Ignored if the main type is not a map or collection.
+	 * @param <T> The class type to convert the attribute value to.
+	 * @return The attribute value converted to the specified class type.
+	 * @throws ParseException
+	 */
+	public <T> T get(HttpPartParser parser, String name, Type type, Type...args) throws ParseException {
+		return (T)parse(parser, name, beanSession.getClassMeta(type, args));
+	}
+	
+	
 	/* Workhorse method */
-	<T> T parse(String name, ClassMeta<T> cm) throws ParseException {
+	<T> T parse(HttpPartParser parser, String name, ClassMeta<T> cm) throws ParseException {
+		if (parser == null)
+			parser = this.parser;
 		Object attr = get(name);
 		T t = null;
 		if (attr != null)
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index de0da8b..adcd3c9 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -3186,34 +3186,48 @@ public final class RestContext extends BeanContext {
 	 * </p>
 	 * 
 	 * <p>
-	 * The following is the default list of supported variables:
+	 * Variables are broken into two categories that describe when they're available for use:
 	 * <ul>
-	 * 	<li><code>$C{key[,defaultValue]}</code> - Config file entry. See {@link ConfigFileVar}.
-	 * 	<li><code>$CO{arg1[,arg2...]}</code> - Coalesce variable. See {@link CoalesceVar}.
-	 * 	<li><code>$CR{arg1[,arg2...]}</code> - Coalesce-and-recurse variable. See {@link CoalesceAndRecurseVar}.
-	 * 	<li><code>$E{envVar[,defaultValue]}</code> - Environment variable. See {@link EnvVariablesVar}.
-	 * 	<li><code>$F{path[,defaultValue]}</code> - File resource. See {@link FileVar}.
-	 * 	<li><code>$I{name[,defaultValue]}</code> - Servlet init parameter. See {@link ServletInitParamVar}.
-	 * 	<li><code>$IF{booleanArg,thenValue[,elseValue]}</code> - If/else variable. See {@link IfVar}.
-	 * 	<li><code>$L{key[,args...]}</code> - Localized message. See {@link LocalizationVar}.
-	 * 	<li><code>$RA{key1[,key2...]}</code> - Request attribute variable. See {@link RequestAttributeVar}.
-	 * 	<li><code>$RF{key1[,key2...]}</code> - Request form-data variable. See {@link RequestFormDataVar}.
-	 * 	<li><code>$RH{key1[,key2...]}</code> - Request header variable. See {@link RequestHeaderVar}.
-	 * 	<li><code>$RP{key1[,key2...]}</code> - Request path variable. See {@link RequestPathVar}.
-	 * 	<li><code>$RQ{key1[,key2...]}</code> - Request query parameter variable. See {@link RequestQueryVar}.
-	 * 	<li><code>$R{key1[,key2...]}</code> - Request object variable. See {@link RequestVar}.
-	 * 	<li><code>$S{systemProperty[,defaultValue]}</code> - System property. See {@link SystemPropertiesVar}.
-	 * 	<li><code>$SA{contentType,key[,defaultValue]}</code> - Serialized request attribute. See {@link SerializedRequestAttrVar}.
-	 * 	<li><code>$SW{stringArg(,pattern,thenValue)+[,elseValue]}</code> - Switch variable. See {@link SwitchVar}.
-	 * 	<li><code>$U{uri}</code> - URI resolver. See {@link UrlVar}.
-	 * 	<li><code>$UE{uriPart}</code> - URL-Encoder. See {@link UrlEncodeVar}.
-	 * 	<li><code>$W{widgetName}</code> - HTML widget variable. See {@link WidgetVar}.
+	 * 	<li><b>Initialization-time variables</b> - Can be used at any time.
+	 * 	<li><b>Request-time variables</b> - Can only be used during HTTP requests.
 	 * </ul>
 	 * 
 	 * <p>
-	 * The list of variables can be extended using the {@link RestContextBuilder#vars(Class...)} method.
-	 * For example, this is used to add support for the Args and Manifest-File variables in the microservice
-	 * <code>Resource</code> class.
+	 * The following is the default list of supported variables.
+	 * <ul>
+	 * 	<li><b>Initialization-time variables</b>
+	 * 	<ul>
+	 * 		<li><code>$C{key[,defaultValue]}</code> - Config file entry. See {@link ConfigFileVar}.
+	 * 		<li><code>$CO{arg1[,arg2...]}</code> - Coalesce variable. See {@link CoalesceVar}.
+	 * 		<li><code>$CR{arg1[,arg2...]}</code> - Coalesce-and-recurse variable. See {@link CoalesceAndRecurseVar}.
+	 * 		<li><code>$E{envVar[,defaultValue]}</code> - Environment variable. See {@link EnvVariablesVar}.
+	 * 		<li><code>$IF{booleanArg,thenValue[,elseValue]}</code> - If/else variable. See {@link IfVar}.
+	 * 		<li><code>$F{path[,defaultValue]}</code> - File resource. See {@link FileVar}.
+	 * 		<li><code>$S{systemProperty[,defaultValue]}</code> - System property. See {@link SystemPropertiesVar}.
+	 * 		<li><code>$SW{stringArg(,pattern,thenValue)+[,elseValue]}</code> - Switch variable. See {@link SwitchVar}.
+	 * 	</ul>
+	 * 	<li><b>Request-time variables</b>
+	 * 	<ul>
+	 * 		<li><code>$I{name[,defaultValue]}</code> - Servlet init parameter. See {@link ServletInitParamVar}.
+	 * 		<li><code>$L{key[,args...]}</code> - Localized message. See {@link LocalizationVar}.
+	 * 		<li><code>$RA{key1[,key2...]}</code> - Request attribute variable. See {@link RequestAttributeVar}.
+	 * 		<li><code>$RF{key1[,key2...]}</code> - Request form-data variable. See {@link RequestFormDataVar}.
+	 * 		<li><code>$RH{key1[,key2...]}</code> - Request header variable. See {@link RequestHeaderVar}.
+	 * 		<li><code>$RP{key1[,key2...]}</code> - Request path variable. See {@link RequestPathVar}.
+	 * 		<li><code>$RQ{key1[,key2...]}</code> - Request query parameter variable. See {@link RequestQueryVar}.
+	 * 		<li><code>$R{key1[,key2...]}</code> - Request object variable. See {@link RequestVar}.
+	 * 		<li><code>$SA{contentType,key[,defaultValue]}</code> - Serialized request attribute. See {@link SerializedRequestAttrVar}.
+	 * 		<li><code>$U{uri}</code> - URI resolver. See {@link UrlVar}.
+	 * 		<li><code>$UE{uriPart}</code> - URL-Encoder. See {@link UrlEncodeVar}.
+	 * 		<li><code>$W{widgetName}</code> - HTML widget variable. See {@link WidgetVar}.
+	 * 	</ul>
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestContextBuilder#vars(Class...)} - For adding custom vars.
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.SvlVariables">Overview &gt; SVL Variables</a
+	 * </ul>
 	 * 
 	 * @return The var resolver in use by this resource.
 	 */
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestParamDefaults.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestParamDefaults.java
index 1eaea31..be3c970 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestParamDefaults.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestParamDefaults.java
@@ -702,7 +702,7 @@ class RestParamDefaults {
 
 		@Override /* RestParam */
 		public Object resolve(RestRequest req, RestResponse res) throws Exception {
-			return req.getResourceBundle();
+			return req.getMessageBundle();
 		}
 	}
 
@@ -714,7 +714,7 @@ class RestParamDefaults {
 
 		@Override /* RestParam */
 		public Object resolve(RestRequest req, RestResponse res) throws Exception {
-			return req.getResourceBundle();
+			return req.getMessageBundle();
 		}
 	}
 
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
index 15d56d0..8ce396a 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -21,6 +21,7 @@ import static org.apache.juneau.serializer.Serializer.*;
 
 import java.io.*;
 import java.lang.reflect.*;
+import java.lang.reflect.Method;
 import java.net.*;
 import java.nio.charset.*;
 import java.text.*;
@@ -35,6 +36,7 @@ import org.apache.juneau.dto.swagger.*;
 import org.apache.juneau.http.*;
 import org.apache.juneau.ini.*;
 import org.apache.juneau.parser.*;
+import org.apache.juneau.rest.annotation.*;
 import org.apache.juneau.rest.widget.*;
 import org.apache.juneau.serializer.*;
 import org.apache.juneau.svl.*;
@@ -198,7 +200,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	/**
 	 * Returns a string of the form <js>"HTTP method-name full-url"</js>
 	 * 
-	 * @return A description of the request.
+	 * @return A description string of the request.
 	 */
 	public String getDescription() {
 		String qs = getQueryString();
@@ -238,7 +240,39 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * Retrieve the properties active for this request.
 	 * 
 	 * <p>
-	 * These properties can be modified by the request.
+	 * This contains all resource and method level properties from the following:
+	 * <ul>
+	 * 	<li class='ja'>{@link RestResource#properties()}
+	 * 	<li class='ja'>{@link RestMethod#properties()}
+	 * 	<li class='jm'>{@link RestContextBuilder#set(String, Object)}
+	 * </ul>
+	 * 
+	 * <p>
+	 * The returned object is modifiable and allows you to override session-level properties before
+	 * they get passed to the serializers.
+	 * <br>However, properties are open-ended, and can be used for any purpose.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(
+	 * 		properties={
+	 * 			<ja>@Property</ja>(name=<jsf>SERIALIZER_sortMaps</jsf>, value=<js>"false"</js>)
+	 * 		}
+	 * 	)
+	 * 	<jk>public</jk> Map doGet(RestRequest req, <ja>@Query</ja>(<js>"sortMaps"</js>) Boolean sortMaps) {
+	 * 		
+	 * 		<jc>// Override value if specified through query parameter.</jc>
+	 * 		<jk>if</jk> (sortMaps != <jk>null</jk>)
+	 * 			req.getProperties().put(<jsf>SERIALIZER_sortMaps</jsf>, sortMaps);
+	 * 
+	 * 		<jk>return</jk> <jsm>getMyMap</jsm>();
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.Properties">Overview &gt; Properties</a
+	 * </ul>
 	 * 
 	 * @return The properties active for this request.
 	 */
@@ -264,9 +298,46 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	//--------------------------------------------------------------------------------
 
 	/**
-	 * Returns the headers on this request.
+	 * Request headers.
+	 * 
+	 * <p>
+	 * Returns a {@link RequestHeaders} object that encapsulates access to HTTP headers on the request.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public</jk> Object myMethod(RestRequest req) {
+	 * 
+	 * 		<jc>// Get access to headers.</jc>
+	 * 		RequestHeaders h = req.getHeaders();
+	 * 
+	 * 		<jc>// Add a default value.</jc>
+	 * 		h.addDefault(<js>"ETag"</js>, <jsf>DEFAULT_UUID</jsf>);
+	 * 
+	 *  		<jc>// Get a header value as a POJO.</jc>
+	 * 		UUID etag = h.get(<js>"ETag"</js>, UUID.<jk>class</jk>);
+	 * 
+	 * 		<jc>// Get a standard header.</jc>
+	 * 		CacheControl = h.getCacheControl();
+	 * 	}			
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>This object is modifiable.
+	 * 	<li>Values are converted from strings using the registered {@link RestContext#REST_partParser part-parser} on the resource class.
+	 * 	<li>The {@link RequestHeaders} object can also be passed as a parameter on the method.
+	 * 	<li>The {@link Header @Header} annotation can be used to access individual header values.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.RequestHeaders">Overview &gt; RequestHeaders</a
+	 * </ul>
 	 * 
-	 * @return The headers on this request.  Never <jk>null</jk>.
+	 * @return 
+	 * 	The headers on this request.  
+	 * 	<br>Never <jk>null</jk>.
 	 */
 	public RequestHeaders getHeaders() {
 		return headers;
@@ -366,16 +437,46 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	//--------------------------------------------------------------------------------
 
 	/**
-	 * Equivalent to {@link #getParameterMap()}, but only looks for query parameters in the URL, not form posts.
+	 * Query parameters. 
 	 * 
 	 * <p>
-	 * This method can be used to retrieve query parameters without triggering the underlying servlet API to load and
-	 * parse the request body.
+	 * Returns a {@link RequestQuery} object that encapsulates access to URL GET parameters.
 	 * 
 	 * <p>
-	 * This object is modifiable.
+	 * Similar to {@link #getParameterMap()} but only looks for query parameters in the URL and not form posts.
 	 * 
-	 * @return The query parameters as a modifiable map.
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public void</jk> doGet(RestRequest req) {
+	 * 	
+	 * 		<jc>// Get access to query parameters on the URL.</jc>
+	 * 		RequestQuery q = req.getQuery();
+	 * 	
+	 * 		<jc>// Get query parameters converted to various types.</jc>
+	 * 		<jk>int</jk> p1 = q.get(<js>"p1"</js>, 0, <jk>int</jk>.<jk>class</jk>);
+	 * 		String p2 = q.get(<js>"p2"</js>, String.<jk>class</jk>);
+	 * 		UUID p3 = q.get(<js>"p3"</js>, UUID.<jk>class</jk>);
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>This object is modifiable.
+	 * 	<li>This method can be used to retrieve query parameters without triggering the underlying servlet API to load and parse the request body.
+	 * 	<li>Values are converted from strings using the registered {@link RestContext#REST_partParser part-parser} on the resource class.
+	 * 	<li>The {@link RequestQuery} object can also be passed as a parameter on the method.
+	 * 	<li>The {@link Query @Query} annotation can be used to access individual query parameter values.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.RequestQuery">Overview &gt; RequestQuery</a
+	 * </ul>
+	 * 
+	 * @return 
+	 * 	The query parameters as a modifiable map.
+	 * 	<br>Never <jk>null</jk>.
 	 */
 	public RequestQuery getQuery() {
 		return queryParams;
@@ -385,7 +486,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * Shortcut for calling <code>getQuery().getString(name)</code>.
 	 * 
 	 * @param name The query parameter name.
-	 * @return The query parameter value, or <jk>null<jk> if not found.
+	 * @return The query parameter value, or <jk>null</jk> if not found.
 	 */
 	public String getQuery(String name) {
 		return getQuery().getString(name);
@@ -397,9 +498,46 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	//--------------------------------------------------------------------------------
 
 	/**
-	 * Retrieves the URL-encoded form data from the request if the body has already been cached locally.
+	 * Form-data.
+	 * 
+	 * <p>
+	 * Returns a {@link RequestFormData} object that encapsulates access to form post parameters.
+	 * 
+	 * <p>
+	 * Similar to {@link #getParameterMap()}, but only looks for form data in the HTTP body.
 	 * 
-	 * @return The URL-encoded form data from the request.
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public void</jk> doPost(RestRequest req) {
+	 * 	
+	 * 		<jc>// Get access to parsed form data parameters.</jc>
+	 * 		RequestFormData fd = req.getFormData();
+	 * 		
+	 * 		<jc>// Get form data parameters converted to various types.</jc>
+	 * 		<jk>int</jk> p1 = fd.get(<js>"p1"</js>, 0, <jk>int</jk>.<jk>class</jk>);
+	 * 		String p2 = fd.get(<js>"p2"</js>, String.<jk>class</jk>);
+	 * 		UUID p3 = fd.get(<js>"p3"</js>, UUID.<jk>class</jk>);
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>This object is modifiable.
+	 * 	<li>Values are converted from strings using the registered {@link RestContext#REST_partParser part-parser} on the resource class.
+	 * 	<li>The {@link RequestFormData} object can also be passed as a parameter on the method.
+	 * 	<li>The {@link FormData @FormDAta} annotation can be used to access individual form data parameter values.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.RequestFormData">Overview &gt; RequestFormData</a
+	 * </ul>
+	 * 
+	 * @return 
+	 * 	The URL-encoded form data from the request.
+	 * 	<br>Never <jk>null</jk>.
+	 * @see org.apache.juneau.rest.annotation.FormData
 	 */
 	public RequestFormData getFormData() {
 		try {
@@ -439,9 +577,44 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	//--------------------------------------------------------------------------------
 
 	/**
-	 * Retrieves the URL-encoded form data from the request if the body has already been cached locally.
+	 * Request path match.
+	 * 
+	 * <p>
+	 * Returns a {@link RequestPathMatch} object that encapsulates access to everything related to the URL path.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(..., path=<js>"/{foo}/{bar}/{baz}/*"</js>)
+	 * 	<jk>public void</jk> doGet(RestRequest req) {
+	 * 	
+	 * 		<jc>// Get access to path data.</jc>
+	 * 		RequestPathMatch pm = req.getPathMatch();
+	 * 		
+	 * 		<jc>// Example URL:  /123/qux/true/quux</jc>
+	 * 		
+	 * 		<jk>int</jk> foo = pm.getInt(<js>"foo"</js>);  <jc>// =123</jc>
+	 * 		String bar = pm.getString(<js>"bar"</js>);  <jc>// =qux</jc>
+	 * 		<jk>boolean</jk> baz = pm.getBoolean(<js>"baz"</js>);  <jc>// =true</jc>
+	 * 		String remainder = pm.getRemainder();  <jc>// =quux</jc>
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>This object is modifiable.
+	 * 	<li>Values are converted from strings using the registered {@link RestContext#REST_partParser part-parser} on the resource class.
+	 * 	<li>The {@link RequestPathMatch} object can also be passed as a parameter on the method.
+	 * 	<li>The {@link Path @Path} and {@link PathRemainder @PathRemainder} annotations can be used to access individual values.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.RequestPathMatch">Overview &gt; RequestPathMatch</a
+	 * </ul>
 	 * 
-	 * @return The URL-encoded form data from the request.
+	 * @return 
+	 * 	The path data from the URL.
+	 * 	<br>Never <jk>null</jk>.
 	 */
 	public RequestPathMatch getPathMatch() {
 		return pathParams;
@@ -451,7 +624,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * Shortcut for calling <code>getPathMatch().get(name)</code>.
 	 * 
 	 * @param name The path variable name.
-	 * @return The path variable value, or <jk>null<jk> if not found.
+	 * @return The path variable value, or <jk>null</jk> if not found.
 	 */
 	public String getPath(String name) {
 		return getPathMatch().get(name);
@@ -462,9 +635,36 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	//--------------------------------------------------------------------------------
 
 	/**
-	 * Returns the body of this HTTP request.
+	 * Request body.
+	 * 
+	 * <p>
+	 * Returns a {@link RequestBody} object that encapsulates access to the HTTP request body.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public void</jk> doPost2(RestRequest req) {
+	 * 		
+	 * 		<jc>// Convert body to a linked list of Person objects.</jc>
+	 * 		List&lt;Person&gt; l = req.getBody().asType(LinkedList.<jk>class</jk>, Person.<jk>class</jk>);
+	 * 		..
+	 * 	}
+	 * </p>
 	 * 
-	 * @return The body of this HTTP request.
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link RequestBody} object can also be passed as a parameter on the method.
+	 * 	<li>The {@link Body @Body} annotation can be used to access the body as well.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.RequestBody">Overview &gt; RequestBody</a
+	 * </ul>
+	 * 
+	 * @return 
+	 * 	The body of this HTTP request.
+	 * 	<br>Never <jk>null</jk>.
 	 */
 	public RequestBody getBody() {
 		return body;
@@ -600,15 +800,97 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	//--------------------------------------------------------------------------------
 
 	/**
-	 * Returns the info provider on the servlet.
+	 * Resource information provider.
 	 * 
-	 * @return The info provider on the servlet.
+	 * <p>
+	 * Returns a {@link RestInfoProvider} object that encapsulates all the textual meta-data on this resource such as
+	 * descriptions, titles, and Swagger documentation.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public void</jk> doGet(RestRequest req) {
+	 * 
+	 * 		<jc>// Get information provider.</jc>
+	 * 		RestInfoProvider p = req.getInfoProvider();
+	 * 		
+	 * 		<jc>// Get localized strings.</jc>
+	 * 		String resourceTitle = p.getTitle(req);
+	 * 		String methodDescription = p.getMethodDescription(req.getMethod(), req);
+	 * 		Contact contact = p.getContact(req);
+	 * 		..
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link RestInfoProvider} object can also be passed as a parameter on the method.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_infoProvider}
+	 * 	<li class='jic'>{@link org.apache.juneau.rest.RestInfoProvider}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getSiteName()}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getResourceTitle()}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getResourceDescription()}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getMethodSummary()}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getMethodDescription()}
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.OptionsPages">Overview &gt; OPTIONS Pages</a
+	 * </ul>
+	 * 
+	 * @return 
+	 * 	The info provider on the resource.
+	 * 	<br>Never <jk>null</jk>.
 	 */
 	public RestInfoProvider getInfoProvider() {
 		return context.getInfoProvider();
 	}
 	
 	/**
+	 * Returns the localized swagger associated with the resource.
+	 * 
+	 * <p>
+	 * A shortcut for calling <code>getInfoProvider().getSwagger(request);</code>
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public</jk> List&lt;Tag&gt; getSwaggerTags(RestRequest req) {
+	 * 		<jk>return</jk> req.getSwagger().getTags();
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link Swagger} object can also be passed as a parameter on the method.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_infoProvider}
+	 * 	<li class='jic'>{@link org.apache.juneau.rest.RestInfoProvider}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getInfoProvider()}
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.OptionsPages">Overview &gt; OPTIONS Pages</a
+	 * </ul>
+	 * 
+	 * @return
+	 * 	The swagger associated with the resource.
+	 * 	<br>Never <jk>null</jk>.
+	 */
+	public Swagger getSwagger() {
+		try {
+			if (swagger == null)
+				swagger = context.getInfoProvider().getSwagger(this);
+			return swagger;
+		} catch (RestException e) {
+			throw e;
+		} catch (Exception e) {
+			throw new RestException(SC_INTERNAL_SERVER_ERROR, e);
+		}
+	}
+
+	/**
 	 * Returns the localized site name.
 	 * 
 	 * <p>
@@ -621,7 +903,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * 	htmldoc=<ja>@HtmlDoc</ja>(
 	 * 		header={
 	 * 			<js>"&lt;h1&gt;$R{siteName}&lt;/h1&gt;"</js>,
-	 * 			<js>"&lt;h2&gt;$R{servletTitle}&lt;/h2&gt;"</js>
+	 * 			<js>"&lt;h2&gt;$R{resourceTitle}&lt;/h2&gt;"</js>
 	 * 		}
 	 * 	)
 	 * </p>
@@ -629,7 +911,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * <p>
 	 * Equivalent to calling {@link RestInfoProvider#getSiteName(RestRequest)} with this object.
 	 * 
-	 * @return The localized servlet label.
+	 * @return The localized site name.
 	 */
 	public String getSiteName() {
 		try {
@@ -642,14 +924,14 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Returns the localized servlet title.
+	 * Returns the localized resource title.
 	 * 
 	 * <p>
 	 * Equivalent to calling {@link RestInfoProvider#getTitle(RestRequest)} with this object.
 	 * 
-	 * @return The localized servlet label.
+	 * @return The localized resource title.
 	 */
-	public String getServletTitle() {
+	public String getResourceTitle() {
 		try {
 			return context.getInfoProvider().getTitle(this);
 		} catch (RestException e) {
@@ -660,14 +942,14 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Returns the localized servlet description.
+	 * Returns the localized resource description.
 	 * 
 	 * <p>
 	 * Equivalent to calling {@link RestInfoProvider#getDescription(RestRequest)} with this object.
 	 * 
-	 * @return The localized servlet description.
+	 * @return The localized resource description.
 	 */
-	public String getServletDescription() {
+	public String getResourceDescription() {
 		try {
 			return context.getInfoProvider().getDescription(this);
 		} catch (RestException e) {
@@ -786,6 +1068,42 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
+	 * Returns the resource bundle for the request locale.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public</jk> String sayHello(RestRequest req, <ja>@Query</ja>(<js>"user"</js>) String user) {
+	 * 
+	 * 		<jc>// Get message bundle.</jc>
+	 * 		MessageBundle mb = req.getMessageBundle();
+	 * 
+	 * 		<jc>// Return a localized message.</jc>
+	 * 		<jk>return</jk> mb.getString(<js>"hello.message"</js>, user);
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link MessageBundle} object can also be passed as a parameter on the method.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_messages}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getMessage(String,Object...)}
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.Messages">Overview &gt; Messages</a>
+	 * </ul>
+	 * 
+	 * @return 
+	 * 	The resource bundle.  
+	 * 	<br>Never <jk>null</jk>.
+	 */
+	public MessageBundle getMessageBundle() {
+		return context.getMessages().getBundle(getLocale());
+	}
+
+	/**
 	 * Shortcut method for calling {@link MessageBundle#getString(Locale, String, Object...)} based on the request locale.
 	 * 
 	 * @param key The message key.
@@ -797,22 +1115,13 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Returns the resource bundle for the request locale.
-	 * 
-	 * @return The resource bundle.  Never <jk>null</jk>.
-	 */
-	public MessageBundle getResourceBundle() {
-		return context.getMessages().getBundle(getLocale());
-	}
-
-	/**
-	 * Returns the servlet handling the request.
+	 * Returns the resource context handling the request.
 	 * 
 	 * <p>
 	 * Can be used to access servlet-init parameters or annotations during requests, such as in calls to
 	 * {@link RestGuard#guard(RestRequest, RestResponse)}..
 	 * 
-	 * @return The servlet handling the request.
+	 * @return The resource context handling the request.
 	 */
 	public RestContext getContext() {
 		return context;
@@ -827,7 +1136,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * 
 	 * <h5 class='section'>Notes:</h5>
 	 * <ul>
-	 * 	<li>This returns null when evaluating servlet-level guards since the method has not been resolved at that
+	 * 	<li>This returns <jk>null</jk? when evaluating servlet-level guards since the method has not been resolved at that
 	 * 		point of execution.
 	 * </ul>
 	 * 
@@ -847,11 +1156,34 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Returns the variable resolver session for this request using session objects created by
-	 * {@link RestCallHandler#getSessionObjects(RestRequest)}.
+	 * Request-level variable resolver session.
 	 * 
 	 * <p>
-	 * See {@link RestContext#getVarResolver()} for the list of supported variables.
+	 * Used to resolve SVL variables in text.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public</jk> String sayHello(RestRequest req) {
+	 * 
+	 * 		<jc>// Get var resolver session.</jc>
+	 * 		VarResolverSession session = getVarResolverSession();
+	 * 
+	 * 		<jc>// Use it to construct a customized message from a query parameter.</jc>
+	 * 		<jk>return</jk> session.resolve(<js>"Hello $RQ{user}!"</js>);
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link VarResolverSession} object can also be passed as a parameter on the method.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestContext#getVarResolver()}
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.SvlVariables">Overview &gt; SVL Variables</a
+	 * </ul>
 	 * 
 	 * @return The variable resolver for this request.
 	 */
@@ -862,29 +1194,27 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Shortcut for calling <code>getVarResolverSession().resolve(input)</code>.
-	 * 
-	 * @param input The input string to resolve variables in.
-	 * @return The string with variables resolved, or <jk>null</jk> if input is null.
-	 */
-	public String resolveVars(String input) {
-		return getVarResolverSession().resolve(input);
-	}
-
-	/**
-	 * Shortcut for calling {@link #resolveVars(String[])} on all elements in the array.
-	 * 
-	 * @param input The input strings to resolve variables in.
-	 * @return A copy of the array with variables resolved.
-	 */
-	public String[] resolveVars(String[] input) {
-		return getVarResolverSession().resolve(input);
-	}
-
-	/**
 	 * Returns an instance of a {@link ReaderResource} that represents the contents of a resource text file from the
 	 * classpath.
 	 * 
+	 * <p>
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<jc>// A rest method that (unsafely!) returns the contents of a localized file </jc>
+	 *	<jc>// from the classpath and resolves any SVL variables embedded in it.</jc>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public</jk> String myMethod(RestRequest req, <ja>@Query</ja>(<js>"file"</js>) String file) {
+	 * 		<jk>return</jk> req.getClasspathResourceAsString(file, <jk>true</jk>);
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_classpathResourceFinder}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getClasspathReaderResource(String, boolean)}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestRequest#getClasspathReaderResource(String)}
+	 * </ul>
+	 * 
 	 * @param name The name of the resource (i.e. the value normally passed to {@link Class#getResourceAsStream(String)}.
 	 * @param resolveVars
 	 * 	If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter @Parameter} variables will be
@@ -932,10 +1262,45 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Returns the config file associated with the servlet.
+	 * Config file associated with the resource.
+	 * 
+	 * <p>
+	 * Returns a config file with session-level variable resolution.
+	 * 
+	 * The config file is identified via one of the following:
+	 * <ul>
+	 * 	<li class='ja'>{@link RestResource#config()}
+	 * 	<li class='jm'>{@link RestContextBuilder#configFile(ConfigFile)}
+	 * </ul>
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public void</jk> doGet(RestRequest req) {
+	 * 
+	 * 		<jc>// Get config file.</jc>
+	 * 		ConfigFile cf = req.getConfigFile();
+	 * 
+	 * 		<jc>// Get simple values from config file.</jc>
+	 * 		<jk>int</jk> timeout = cf.getInt(<js>"MyResource/timeout"</js>, 10000);
+	 * 
+	 * 		<jc>// Get complex values from config file.</jc>
+	 * 		MyBean b = cf.getObject(<js>"MyResource/myBean"</js>, MyBean.<jk>class</jk>);
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link ConfigFile} object can also be passed as a parameter on the method.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.ConfigurationFiles">Overview &gt; Configuration Files</a
+	 * </ul>
 	 * 
 	 * @return
-	 * 	The config file associated with the servlet, or <jk>null</jk> if servlet does not have a config file
+	 * 	The config file associated with the resource, or <jk>null</jk> if resource does not have a config file
 	 * 	associated with it.
 	 */
 	public ConfigFile getConfigFile() {
@@ -945,25 +1310,6 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
-	 * Returns the localized swagger associated with the servlet.
-	 * 
-	 * @return
-	 * 	The swagger associated with the servlet.
-	 * 	Never <jk>null</jk>.
-	 */
-	public Swagger getSwagger() {
-		try {
-			if (swagger == null)
-				swagger = context.getInfoProvider().getSwagger(this);
-			return swagger;
-		} catch (RestException e) {
-			throw e;
-		} catch (Exception e) {
-			throw new RestException(SC_INTERNAL_SERVER_ERROR, e);
-		}
-	}
-
-	/**
 	 * Returns the widgets used for resolving <js>"$W{...}"</js> string variables.
 	 * 
 	 * @return
@@ -1003,9 +1349,37 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	}
 
 	/**
+	 * Logger.
+	 * 
+	 * <p>
 	 * Shortcut for calling <code>getContext().getLogger()</code>.
 	 * 
-	 * @return The logger associated with the resource context.
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(...)
+	 * 	<jk>public void</jk> doGet(RestRequest req) {
+	 * 
+	 * 		req.getLogger().logObjects(<jsf>FINE</jsf>, <js>"Request query parameters = {0}"</js>, req.getQuery()); 		
+	 * 	}
+	 * </p>
+	 * 
+	 * <h5 class='section'>Notes:</h5>
+	 * <ul>
+	 * 	<li>The {@link RestLogger} object can also be passed as a parameter on the method.
+	 * </ul>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_logger}
+	 * 	<li class='jac'>{@link org.apache.juneau.rest.RestLogger}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestServlet#log(Level, String, Object...)}
+	 * 	<li class='jm'>{@link org.apache.juneau.rest.RestServlet#logObjects(Level, String, Object...)}
+	 * 	<li class='link'><a class="doclink" href="../../../../overview-summary.html#juneau-rest-server.LoggingAndErrorHandling">Overview &gt; Logging and Error Handling</a
+	 * </ul>
+	 * 
+	 * @return 
+	 * 	The logger associated with the resource context.
+	 * 	<br>Never <jk>null</jk>.
 	 */
 	public RestLogger getLogger() {
 		return context.getLogger();
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServlet.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServlet.java
index be9b30c..3fe3654 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServlet.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServlet.java
@@ -23,9 +23,6 @@ import java.util.logging.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
-import org.apache.juneau.*;
-import org.apache.juneau.utils.*;
-
 /**
  * Servlet implementation of a REST resource.
  * 
@@ -121,21 +118,6 @@ public abstract class RestServlet extends HttpServlet {
 		return context;
 	}
 
-	/**
-	 * Convenience method if you want to perform initialization on your resource after all configuration settings
-	 * have been made.
-	 * 
-	 * <p>
-	 * This allows you to get access to the {@link RestContext} object during initialization.
-	 * 
-	 * <p>
-	 * The default implementation does nothing.
-	 * 
-	 * @param context The servlet context containing all the set-in-stone configurations for this resource.
-	 * @throws Exception Any exception can be thrown to signal an initialization failure.
-	 */
-	public synchronized void init(RestContext context) throws Exception {}
-
 
 	//--------------------------------------------------------------------------------
 	// Other methods
@@ -168,6 +150,18 @@ public abstract class RestServlet extends HttpServlet {
 			r2.sendError(SC_INTERNAL_SERVER_ERROR, e.getLocalizedMessage());
 		}
 	}
+	
+	@Override /* GenericServlet */
+	public void log(String msg) {
+		if (context != null)
+			context.getLogger().log(INFO, msg);
+	}
+
+	@Override /* GenericServlet */
+	public void log(String msg, Throwable cause) {
+		if (context != null)
+			context.getLogger().log(INFO, cause, msg);
+	}
 
 	/**
 	 * Convenience method for calling <code>getContext().getLogger().log(level, msg, args);</code>
@@ -176,12 +170,24 @@ public abstract class RestServlet extends HttpServlet {
 	 * @param msg The message to log.
 	 * @param args Optional {@link MessageFormat}-style arguments.
 	 */
-	protected void log(Level level, String msg, Object...args) {
+	public void log(Level level, String msg, Object...args) {
 		if (context != null)
 			context.getLogger().log(level, msg, args);
 	}
 
 	/**
+	 * Convenience method for calling <code>getContext().getLogger().logObjects(level, msg, args);</code>
+	 * 
+	 * @param level The log level.
+	 * @param msg The message to log.
+	 * @param args Optional {@link MessageFormat}-style arguments.
+	 */
+	public void logObjects(Level level, String msg, Object...args) {
+		if (context != null)
+			context.getLogger().logObjects(level, msg, args);
+	}
+
+	/**
 	 * Convenience method for calling <code>getContext().getLogger().log(level, cause, msg, args);</code>
 	 * 
 	 * @param level The log level.
@@ -189,7 +195,7 @@ public abstract class RestServlet extends HttpServlet {
 	 * @param msg The message to log.
 	 * @param args Optional {@link MessageFormat}-style arguments.
 	 */
-	protected void log(Level level, Throwable cause, String msg, Object...args) {
+	public void log(Level level, Throwable cause, String msg, Object...args) {
 		if (context != null)
 			context.getLogger().log(level, cause, msg, args);
 		else {
@@ -208,16 +214,6 @@ public abstract class RestServlet extends HttpServlet {
 	}
 
 	/**
-	 * Convenience method for calling <code>getContext().getMessages();</code>
-	 * 
-	 * @return The resource bundle for this resource.  Never <jk>null</jk>.
-	 * @see RestContext#getProperties()
-	 */
-	public MessageBundle getMessages() {
-		return context.getMessages();
-	}
-
-	/**
 	 * Convenience method for calling <code>getContext().getProperties();</code>
 	 * 
 	 * @return The resource properties as an {@link RestContextProperties}.
@@ -226,14 +222,4 @@ public abstract class RestServlet extends HttpServlet {
 	public RestContextProperties getProperties() {
 		return getContext().getProperties();
 	}
-
-	/**
-	 * Convenience method for calling <code>getContext().getBeanContext();</code>
-	 * 
-	 * @return The bean context used for parsing path variables and header values.
-	 * @see RestContext#getBeanContext()
-	 */
-	public BeanContext getBeanContext() {
-		return getContext().getBeanContext();
-	}
 }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServletDefault.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServletDefault.java
index 9d971bc..e3151b1 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServletDefault.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestServletDefault.java
@@ -197,8 +197,8 @@ import org.apache.juneau.xml.*;
 	allowedMethodParams="OPTIONS",
 	htmldoc=@HtmlDoc(
 		header={
-			"<h1>$R{servletTitle}</h1>",
-			"<h2>$R{methodSummary,servletDescription}</h2>",
+			"<h1>$R{resourceTitle}</h1>",
+			"<h2>$R{methodSummary,resourceDescription}</h2>",
 			"<a href='http://juneau.apache.org'><img src='$U{servlet:/htdocs/juneau.png}' style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/></a>"
 		},
 		stylesheet="servlet:/styles/light.css",
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
index e274a6f..72c8ba6 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
@@ -345,7 +345,7 @@ public @interface RestResource {
 	 * 
 	 * <p>
 	 * It is used to populate the Swagger description field.
-	 * This value can be retrieved programmatically through the {@link RestRequest#getServletDescription()} method.
+	 * This value can be retrieved programmatically through the {@link RestRequest#getResourceDescription()} method.
 	 * 
 	 * <p>
 	 * The default value pulls the description from the <code>description</code> entry in the servlet resource bundle.
@@ -792,7 +792,7 @@ public @interface RestResource {
 	 * 	htmldoc=<ja>@HtmlDoc</ja>(
 	 * 		header={
 	 * 			<js>"&lt;h1&gt;$R{siteName}&lt;/h1&gt;"</js>,
-	 * 			<js>"&lt;h2&gt;$R{servletTitle}&lt;/h2&gt;"</js>
+	 * 			<js>"&lt;h2&gt;$R{resourceTitle}&lt;/h2&gt;"</js>
 	 * 		}
 	 * 	)
 	 * </p>
@@ -947,7 +947,7 @@ public @interface RestResource {
 	 * 
 	 * <p>
 	 * It is used to populate the Swagger title field.
-	 * This value can be retrieved programmatically through the {@link RestRequest#getServletTitle()} method.
+	 * This value can be retrieved programmatically through the {@link RestRequest#getResourceTitle()} method.
 	 * 
 	 * <p>
 	 * The default value pulls the label from the <code>label</code> entry in the servlet resource bundle.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/vars/RequestVar.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
index 1030a34..ffa451d 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
@@ -34,10 +34,10 @@ import org.apache.juneau.svl.*;
  * 	<li><js>"pathInfo"</js> - Value returned by {@link RestRequest#getPathInfo()}
  * 	<li><js>"requestParentURI"</js> - Value returned by {@link UriContext#getRootRelativePathInfoParent()}
  * 	<li><js>"requestURI"</js> - Value returned by {@link RestRequest#getRequestURI()}
- * 	<li><js>"servletDescription"</js> - Value returned by {@link RestRequest#getServletDescription()}
+ * 	<li><js>"resourceDescription"</js> - Value returned by {@link RestRequest#getResourceDescription()}
+ * 	<li><js>"resourceTitle"</js> - See {@link RestRequest#getResourceTitle()}
  * 	<li><js>"servletParentURI"</js> - Value returned by {@link UriContext#getRootRelativeServletPathParent()}
  * 	<li><js>"servletPath"</js> - See {@link RestRequest#getServletPath()}
- * 	<li><js>"servletTitle"</js> - See {@link RestRequest#getServletTitle()}
  * 	<li><js>"servletURI"</js> - See {@link UriContext#getRootRelativeServletPath()}
  * 	<li><js>"siteName"</js> - See {@link RestRequest#getSiteName()}
  * </ul>
@@ -45,8 +45,8 @@ import org.apache.juneau.svl.*;
  * <p>
  * <h6 class='section'>Example:</h6>
  * <p class='bcode'>
- * 	String servletTitle = restRequest.resolveVars(<js>"$R{servletTitle}"</js>); 
- * 	String servletTitleOrDescription = restRequest.resolveVars(<js>"$R{servletTitle,servletDescription}"</js>); 
+ * 	String resourceTitle = restRequest.resolveVars(<js>"$R{resourceTitle}"</js>); 
+ * 	String resourceTitleOrDescription = restRequest.resolveVars(<js>"$R{resourceTitle,resourceDescription}"</js>); 
  * </p>
  * 
  * 
@@ -115,19 +115,19 @@ public class RequestVar extends MultipartResolvingVar {
 				return req.getUriContext().getRootRelativePathInfoParent();
 			if ("requestURI".equals(key))
 				return req.getRequestURI();
+			if ("resourceDescription".equals(key))
+				return req.getResourceDescription();
+			if ("resourceTitle".equals(key))
+				return req.getResourceTitle();
 		} else if (c == 's') {
 			if ("servletClass".equals(key))
 				return req.getContext().getResource().getClass().getName();
 			if ("servletClassSimple".equals(key))
 				return req.getContext().getResource().getClass().getSimpleName();
-			if ("servletDescription".equals(key))
-				return req.getServletDescription();
 			if ("servletParentURI".equals(key))
 				return req.getUriContext().getRootRelativeServletPathParent();
 			if ("servletPath".equals(key))
 				return req.getServletPath();
-			if ("servletTitle".equals(key))
-				return req.getServletTitle();
 			if ("servletURI".equals(key))
 				return req.getUriContext().getRootRelativeServletPath();
 			if ("siteName".equals(key))

-- 
To stop receiving notification emails like this one, please contact
jamesbognar@apache.org.

Mime
View raw message