juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [06/51] [partial] incubator-juneau-website git commit: Support for passing in more class types to REST methods.
Date Mon, 08 May 2017 15:32:36 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/f1f17bc3/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html b/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
index fad2db3..3a1aa5e 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
@@ -24,1514 +24,1606 @@
 <span class="sourceLineNo">016</span>import static org.apache.juneau.internal.StringUtils.*;<a name="line.16"></a>
 <span class="sourceLineNo">017</span><a name="line.17"></a>
 <span class="sourceLineNo">018</span>import java.io.*;<a name="line.18"></a>
-<span class="sourceLineNo">019</span>import java.lang.reflect.*;<a name="line.19"></a>
-<span class="sourceLineNo">020</span>import java.lang.reflect.Method;<a name="line.20"></a>
-<span class="sourceLineNo">021</span>import java.util.*;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import java.util.concurrent.*;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import java.util.concurrent.atomic.*;<a name="line.23"></a>
-<span class="sourceLineNo">024</span><a name="line.24"></a>
-<span class="sourceLineNo">025</span>import javax.activation.*;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import javax.servlet.*;<a name="line.26"></a>
-<span class="sourceLineNo">027</span><a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.juneau.*;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.juneau.encoders.*;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.apache.juneau.http.*;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.apache.juneau.ini.*;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.apache.juneau.internal.*;<a name="line.32"></a>
-<span class="sourceLineNo">033</span>import org.apache.juneau.json.*;<a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.juneau.parser.*;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.juneau.rest.annotation.*;<a name="line.35"></a>
-<span class="sourceLineNo">036</span>import org.apache.juneau.rest.vars.*;<a name="line.36"></a>
-<span class="sourceLineNo">037</span>import org.apache.juneau.serializer.*;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>import org.apache.juneau.svl.*;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>import org.apache.juneau.urlencoding.*;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>import org.apache.juneau.utils.*;<a name="line.40"></a>
-<span class="sourceLineNo">041</span><a name="line.41"></a>
-<span class="sourceLineNo">042</span>/**<a name="line.42"></a>
-<span class="sourceLineNo">043</span> * Contains all the configuration on a REST resource and the entry points for handling REST calls.<a name="line.43"></a>
-<span class="sourceLineNo">044</span> * &lt;p&gt;<a name="line.44"></a>
-<span class="sourceLineNo">045</span> * See {@link PropertyStore} for more information about context properties.<a name="line.45"></a>
-<span class="sourceLineNo">046</span> */<a name="line.46"></a>
-<span class="sourceLineNo">047</span>public final class RestContext extends Context {<a name="line.47"></a>
-<span class="sourceLineNo">048</span><a name="line.48"></a>
-<span class="sourceLineNo">049</span>   /**<a name="line.49"></a>
-<span class="sourceLineNo">050</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Enable header URL parameters.<a name="line.50"></a>
-<span class="sourceLineNo">051</span>    * &lt;p&gt;<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    * &lt;ul&gt;<a name="line.52"></a>
-<span class="sourceLineNo">053</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.allowHeaderParams"&lt;/js&gt;<a name="line.53"></a>
-<span class="sourceLineNo">054</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;true&lt;/jk&gt;<a name="line.55"></a>
-<span class="sourceLineNo">056</span>    * &lt;/ul&gt;<a name="line.56"></a>
-<span class="sourceLineNo">057</span>    * &lt;p&gt;<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    * When enabled, headers such as &lt;js&gt;"Accept"&lt;/js&gt; and &lt;js&gt;"Content-Type"&lt;/js&gt; to be passed in as URL query parameters.<a name="line.58"></a>
-<span class="sourceLineNo">059</span>    * For example:  &lt;js&gt;"?Accept=text/json&amp;amp;Content-Type=text/json"&lt;/js&gt;<a name="line.59"></a>
-<span class="sourceLineNo">060</span>    * &lt;p&gt;<a name="line.60"></a>
-<span class="sourceLineNo">061</span>    * Parameter names are case-insensitive.<a name="line.61"></a>
+<span class="sourceLineNo">019</span>import java.lang.annotation.*;<a name="line.19"></a>
+<span class="sourceLineNo">020</span>import java.lang.reflect.*;<a name="line.20"></a>
+<span class="sourceLineNo">021</span>import java.lang.reflect.Method;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import java.util.*;<a name="line.22"></a>
+<span class="sourceLineNo">023</span>import java.util.concurrent.*;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import java.util.concurrent.atomic.*;<a name="line.24"></a>
+<span class="sourceLineNo">025</span><a name="line.25"></a>
+<span class="sourceLineNo">026</span>import javax.activation.*;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import javax.servlet.*;<a name="line.27"></a>
+<span class="sourceLineNo">028</span><a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.juneau.*;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.juneau.encoders.*;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.juneau.http.*;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.juneau.ini.*;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.juneau.internal.*;<a name="line.33"></a>
+<span class="sourceLineNo">034</span>import org.apache.juneau.json.*;<a name="line.34"></a>
+<span class="sourceLineNo">035</span>import org.apache.juneau.parser.*;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import org.apache.juneau.rest.annotation.*;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import org.apache.juneau.rest.annotation.Properties;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.juneau.rest.vars.*;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>import org.apache.juneau.serializer.*;<a name="line.39"></a>
+<span class="sourceLineNo">040</span>import org.apache.juneau.svl.*;<a name="line.40"></a>
+<span class="sourceLineNo">041</span>import org.apache.juneau.urlencoding.*;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>import org.apache.juneau.utils.*;<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>/**<a name="line.44"></a>
+<span class="sourceLineNo">045</span> * Contains all the configuration on a REST resource and the entry points for handling REST calls.<a name="line.45"></a>
+<span class="sourceLineNo">046</span> * &lt;p&gt;<a name="line.46"></a>
+<span class="sourceLineNo">047</span> * See {@link PropertyStore} for more information about context properties.<a name="line.47"></a>
+<span class="sourceLineNo">048</span> */<a name="line.48"></a>
+<span class="sourceLineNo">049</span>public final class RestContext extends Context {<a name="line.49"></a>
+<span class="sourceLineNo">050</span><a name="line.50"></a>
+<span class="sourceLineNo">051</span>   /**<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Enable header URL parameters.<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    * &lt;p&gt;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>    * &lt;ul&gt;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.allowHeaderParams"&lt;/js&gt;<a name="line.55"></a>
+<span class="sourceLineNo">056</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;true&lt;/jk&gt;<a name="line.57"></a>
+<span class="sourceLineNo">058</span>    * &lt;/ul&gt;<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    * &lt;p&gt;<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    * When enabled, headers such as &lt;js&gt;"Accept"&lt;/js&gt; and &lt;js&gt;"Content-Type"&lt;/js&gt; to be passed in as URL query parameters.<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    * For example:  &lt;js&gt;"?Accept=text/json&amp;amp;Content-Type=text/json"&lt;/js&gt;<a name="line.61"></a>
 <span class="sourceLineNo">062</span>    * &lt;p&gt;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    * Useful for debugging REST interface using only a browser.<a name="line.63"></a>
+<span class="sourceLineNo">063</span>    * Parameter names are case-insensitive.<a name="line.63"></a>
 <span class="sourceLineNo">064</span>    * &lt;p&gt;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>    * Applicable to servlet class only.<a name="line.65"></a>
-<span class="sourceLineNo">066</span>    */<a name="line.66"></a>
-<span class="sourceLineNo">067</span>   public static final String REST_allowHeaderParams = "RestServlet.allowHeaderParams";<a name="line.67"></a>
-<span class="sourceLineNo">068</span><a name="line.68"></a>
-<span class="sourceLineNo">069</span>   /**<a name="line.69"></a>
-<span class="sourceLineNo">070</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Enable &lt;js&gt;"method"&lt;/js&gt; URL parameter for specific HTTP methods.<a name="line.70"></a>
-<span class="sourceLineNo">071</span>    * &lt;p&gt;<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    * &lt;ul&gt;<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.allowMethodParam"&lt;/js&gt;<a name="line.73"></a>
-<span class="sourceLineNo">074</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;String&lt;/code&gt;<a name="line.74"></a>
-<span class="sourceLineNo">075</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;js&gt;""&lt;/js&gt;<a name="line.75"></a>
-<span class="sourceLineNo">076</span>    * &lt;/ul&gt;<a name="line.76"></a>
-<span class="sourceLineNo">077</span>    * &lt;p&gt;<a name="line.77"></a>
-<span class="sourceLineNo">078</span>    * When specified, the HTTP method can be overridden by passing in a &lt;js&gt;"method"&lt;/js&gt; URL parameter on a regular GET request.<a name="line.78"></a>
-<span class="sourceLineNo">079</span>    * For example:  &lt;js&gt;"?method=OPTIONS"&lt;/js&gt;<a name="line.79"></a>
-<span class="sourceLineNo">080</span>    * &lt;p&gt;<a name="line.80"></a>
-<span class="sourceLineNo">081</span>    * Format is a comma-delimited list of HTTP method names that can be passed in as a method parameter.<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    * Parameter name is case-insensitive.<a name="line.82"></a>
-<span class="sourceLineNo">083</span>    * Use "*" to represent all methods.<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    * For backwards compatibility, "true" also means "*".<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    * &lt;p&gt;<a name="line.85"></a>
-<span class="sourceLineNo">086</span>    * Note that per the &lt;a class="doclink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html"&gt;HTTP specification&lt;/a&gt;, special care should<a name="line.86"></a>
-<span class="sourceLineNo">087</span>    *    be taken when allowing non-safe (POST, PUT, DELETE) methods to be invoked through GET requests.<a name="line.87"></a>
-<span class="sourceLineNo">088</span>    * &lt;p&gt;<a name="line.88"></a>
-<span class="sourceLineNo">089</span>    * Applicable to servlet class only.<a name="line.89"></a>
+<span class="sourceLineNo">065</span>    * Useful for debugging REST interface using only a browser.<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    * &lt;p&gt;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    * Applicable to servlet class only.<a name="line.67"></a>
+<span class="sourceLineNo">068</span>    */<a name="line.68"></a>
+<span class="sourceLineNo">069</span>   public static final String REST_allowHeaderParams = "RestServlet.allowHeaderParams";<a name="line.69"></a>
+<span class="sourceLineNo">070</span><a name="line.70"></a>
+<span class="sourceLineNo">071</span>   /**<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Enable &lt;js&gt;"method"&lt;/js&gt; URL parameter for specific HTTP methods.<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    * &lt;p&gt;<a name="line.73"></a>
+<span class="sourceLineNo">074</span>    * &lt;ul&gt;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.allowMethodParam"&lt;/js&gt;<a name="line.75"></a>
+<span class="sourceLineNo">076</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;String&lt;/code&gt;<a name="line.76"></a>
+<span class="sourceLineNo">077</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;js&gt;""&lt;/js&gt;<a name="line.77"></a>
+<span class="sourceLineNo">078</span>    * &lt;/ul&gt;<a name="line.78"></a>
+<span class="sourceLineNo">079</span>    * &lt;p&gt;<a name="line.79"></a>
+<span class="sourceLineNo">080</span>    * When specified, the HTTP method can be overridden by passing in a &lt;js&gt;"method"&lt;/js&gt; URL parameter on a regular GET request.<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    * For example:  &lt;js&gt;"?method=OPTIONS"&lt;/js&gt;<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    * &lt;p&gt;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    * Format is a comma-delimited list of HTTP method names that can be passed in as a method parameter.<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    * Parameter name is case-insensitive.<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    * Use "*" to represent all methods.<a name="line.85"></a>
+<span class="sourceLineNo">086</span>    * For backwards compatibility, "true" also means "*".<a name="line.86"></a>
+<span class="sourceLineNo">087</span>    * &lt;p&gt;<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    * Note that per the &lt;a class="doclink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html"&gt;HTTP specification&lt;/a&gt;, special care should<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    *    be taken when allowing non-safe (POST, PUT, DELETE) methods to be invoked through GET requests.<a name="line.89"></a>
 <span class="sourceLineNo">090</span>    * &lt;p&gt;<a name="line.90"></a>
-<span class="sourceLineNo">091</span>    * Example: &lt;js&gt;"HEAD,OPTIONS"&lt;/js&gt;<a name="line.91"></a>
-<span class="sourceLineNo">092</span>    */<a name="line.92"></a>
-<span class="sourceLineNo">093</span>   public static final String REST_allowMethodParam = "RestServlet.allowMethodParam";<a name="line.93"></a>
-<span class="sourceLineNo">094</span><a name="line.94"></a>
-<span class="sourceLineNo">095</span>   /**<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Enable &lt;js&gt;"body"&lt;/js&gt; URL parameter.<a name="line.96"></a>
-<span class="sourceLineNo">097</span>    * &lt;p&gt;<a name="line.97"></a>
-<span class="sourceLineNo">098</span>    * &lt;ul&gt;<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.allowBodyParam"&lt;/js&gt;<a name="line.99"></a>
-<span class="sourceLineNo">100</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.100"></a>
-<span class="sourceLineNo">101</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;true&lt;/jk&gt;<a name="line.101"></a>
-<span class="sourceLineNo">102</span>    * &lt;/ul&gt;<a name="line.102"></a>
-<span class="sourceLineNo">103</span>    * &lt;p&gt;<a name="line.103"></a>
-<span class="sourceLineNo">104</span>    * When enabled, the HTTP body content on PUT and POST requests can be passed in as text using the &lt;js&gt;"body"&lt;/js&gt; URL parameter.<a name="line.104"></a>
-<span class="sourceLineNo">105</span>    * For example:  &lt;js&gt;"?body={name:'John%20Smith',age:45}"&lt;/js&gt;<a name="line.105"></a>
-<span class="sourceLineNo">106</span>    * &lt;p&gt;<a name="line.106"></a>
-<span class="sourceLineNo">107</span>    * Parameter name is case-insensitive.<a name="line.107"></a>
+<span class="sourceLineNo">091</span>    * Applicable to servlet class only.<a name="line.91"></a>
+<span class="sourceLineNo">092</span>    * &lt;p&gt;<a name="line.92"></a>
+<span class="sourceLineNo">093</span>    * Example: &lt;js&gt;"HEAD,OPTIONS"&lt;/js&gt;<a name="line.93"></a>
+<span class="sourceLineNo">094</span>    */<a name="line.94"></a>
+<span class="sourceLineNo">095</span>   public static final String REST_allowMethodParam = "RestServlet.allowMethodParam";<a name="line.95"></a>
+<span class="sourceLineNo">096</span><a name="line.96"></a>
+<span class="sourceLineNo">097</span>   /**<a name="line.97"></a>
+<span class="sourceLineNo">098</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Enable &lt;js&gt;"body"&lt;/js&gt; URL parameter.<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    * &lt;p&gt;<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    * &lt;ul&gt;<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.allowBodyParam"&lt;/js&gt;<a name="line.101"></a>
+<span class="sourceLineNo">102</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.102"></a>
+<span class="sourceLineNo">103</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;true&lt;/jk&gt;<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    * &lt;/ul&gt;<a name="line.104"></a>
+<span class="sourceLineNo">105</span>    * &lt;p&gt;<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    * When enabled, the HTTP body content on PUT and POST requests can be passed in as text using the &lt;js&gt;"body"&lt;/js&gt; URL parameter.<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    * For example:  &lt;js&gt;"?body={name:'John%20Smith',age:45}"&lt;/js&gt;<a name="line.107"></a>
 <span class="sourceLineNo">108</span>    * &lt;p&gt;<a name="line.108"></a>
-<span class="sourceLineNo">109</span>    * Useful for debugging PUT and POST methods using only a browser.<a name="line.109"></a>
+<span class="sourceLineNo">109</span>    * Parameter name is case-insensitive.<a name="line.109"></a>
 <span class="sourceLineNo">110</span>    * &lt;p&gt;<a name="line.110"></a>
-<span class="sourceLineNo">111</span>    * Applicable to servlet class only.<a name="line.111"></a>
-<span class="sourceLineNo">112</span>    */<a name="line.112"></a>
-<span class="sourceLineNo">113</span>   public static final String REST_allowBodyParam = "RestServlet.allowBodyParam";<a name="line.113"></a>
-<span class="sourceLineNo">114</span><a name="line.114"></a>
-<span class="sourceLineNo">115</span>   /**<a name="line.115"></a>
-<span class="sourceLineNo">116</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Render stack traces.<a name="line.116"></a>
-<span class="sourceLineNo">117</span>    * &lt;p&gt;<a name="line.117"></a>
-<span class="sourceLineNo">118</span>    * &lt;ul&gt;<a name="line.118"></a>
-<span class="sourceLineNo">119</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.renderResponseStackTraces"&lt;/js&gt;<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.120"></a>
-<span class="sourceLineNo">121</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;false&lt;/jk&gt;<a name="line.121"></a>
-<span class="sourceLineNo">122</span>    * &lt;/ul&gt;<a name="line.122"></a>
-<span class="sourceLineNo">123</span>    * &lt;p&gt;<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    * Render stack traces in HTTP response bodies when errors occur.<a name="line.124"></a>
+<span class="sourceLineNo">111</span>    * Useful for debugging PUT and POST methods using only a browser.<a name="line.111"></a>
+<span class="sourceLineNo">112</span>    * &lt;p&gt;<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    * Applicable to servlet class only.<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    */<a name="line.114"></a>
+<span class="sourceLineNo">115</span>   public static final String REST_allowBodyParam = "RestServlet.allowBodyParam";<a name="line.115"></a>
+<span class="sourceLineNo">116</span><a name="line.116"></a>
+<span class="sourceLineNo">117</span>   /**<a name="line.117"></a>
+<span class="sourceLineNo">118</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Render stack traces.<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    * &lt;p&gt;<a name="line.119"></a>
+<span class="sourceLineNo">120</span>    * &lt;ul&gt;<a name="line.120"></a>
+<span class="sourceLineNo">121</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.renderResponseStackTraces"&lt;/js&gt;<a name="line.121"></a>
+<span class="sourceLineNo">122</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;false&lt;/jk&gt;<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    * &lt;/ul&gt;<a name="line.124"></a>
 <span class="sourceLineNo">125</span>    * &lt;p&gt;<a name="line.125"></a>
-<span class="sourceLineNo">126</span>    * When enabled, Java stack traces will be rendered in the output response.<a name="line.126"></a>
-<span class="sourceLineNo">127</span>    * Useful for debugging, although allowing stack traces to be rendered may cause security concerns.<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    * &lt;p&gt;<a name="line.128"></a>
-<span class="sourceLineNo">129</span>    * Applicable to servlet class only.<a name="line.129"></a>
-<span class="sourceLineNo">130</span>    */<a name="line.130"></a>
-<span class="sourceLineNo">131</span>   public static final String REST_renderResponseStackTraces = "RestServlet.renderResponseStackTraces";<a name="line.131"></a>
-<span class="sourceLineNo">132</span><a name="line.132"></a>
-<span class="sourceLineNo">133</span>   /**<a name="line.133"></a>
-<span class="sourceLineNo">134</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Use stack trace hashes.<a name="line.134"></a>
-<span class="sourceLineNo">135</span>    * &lt;p&gt;<a name="line.135"></a>
-<span class="sourceLineNo">136</span>    * &lt;ul&gt;<a name="line.136"></a>
-<span class="sourceLineNo">137</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.useStackTraceHashes"&lt;/js&gt;<a name="line.137"></a>
-<span class="sourceLineNo">138</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.138"></a>
-<span class="sourceLineNo">139</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;true&lt;/jk&gt;<a name="line.139"></a>
-<span class="sourceLineNo">140</span>    * &lt;/ul&gt;<a name="line.140"></a>
-<span class="sourceLineNo">141</span>    * &lt;p&gt;<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    * When enabled, the number of times an exception has occurred will be determined based on stack trace hashsums,<a name="line.142"></a>
-<span class="sourceLineNo">143</span>    *    made available through the {@link RestException#getOccurrence()} method.<a name="line.143"></a>
-<span class="sourceLineNo">144</span>    * &lt;p&gt;<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    * Applicable to servlet class only.<a name="line.145"></a>
-<span class="sourceLineNo">146</span>    */<a name="line.146"></a>
-<span class="sourceLineNo">147</span>   public static final String REST_useStackTraceHashes = "RestServlet.useStackTraceHashes";<a name="line.147"></a>
-<span class="sourceLineNo">148</span><a name="line.148"></a>
-<span class="sourceLineNo">149</span>   /**<a name="line.149"></a>
-<span class="sourceLineNo">150</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Default character encoding.<a name="line.150"></a>
-<span class="sourceLineNo">151</span>    * &lt;p&gt;<a name="line.151"></a>
-<span class="sourceLineNo">152</span>    * &lt;ul&gt;<a name="line.152"></a>
-<span class="sourceLineNo">153</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.defaultCharset"&lt;/js&gt;<a name="line.153"></a>
-<span class="sourceLineNo">154</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;String&lt;/code&gt;<a name="line.154"></a>
-<span class="sourceLineNo">155</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;js&gt;"utf-8"&lt;/js&gt;<a name="line.155"></a>
-<span class="sourceLineNo">156</span>    * &lt;/ul&gt;<a name="line.156"></a>
-<span class="sourceLineNo">157</span>    * &lt;p&gt;<a name="line.157"></a>
-<span class="sourceLineNo">158</span>    * The default character encoding for the request and response if not specified on the request.<a name="line.158"></a>
+<span class="sourceLineNo">126</span>    * Render stack traces in HTTP response bodies when errors occur.<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    * &lt;p&gt;<a name="line.127"></a>
+<span class="sourceLineNo">128</span>    * When enabled, Java stack traces will be rendered in the output response.<a name="line.128"></a>
+<span class="sourceLineNo">129</span>    * Useful for debugging, although allowing stack traces to be rendered may cause security concerns.<a name="line.129"></a>
+<span class="sourceLineNo">130</span>    * &lt;p&gt;<a name="line.130"></a>
+<span class="sourceLineNo">131</span>    * Applicable to servlet class only.<a name="line.131"></a>
+<span class="sourceLineNo">132</span>    */<a name="line.132"></a>
+<span class="sourceLineNo">133</span>   public static final String REST_renderResponseStackTraces = "RestServlet.renderResponseStackTraces";<a name="line.133"></a>
+<span class="sourceLineNo">134</span><a name="line.134"></a>
+<span class="sourceLineNo">135</span>   /**<a name="line.135"></a>
+<span class="sourceLineNo">136</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Use stack trace hashes.<a name="line.136"></a>
+<span class="sourceLineNo">137</span>    * &lt;p&gt;<a name="line.137"></a>
+<span class="sourceLineNo">138</span>    * &lt;ul&gt;<a name="line.138"></a>
+<span class="sourceLineNo">139</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.useStackTraceHashes"&lt;/js&gt;<a name="line.139"></a>
+<span class="sourceLineNo">140</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;Boolean&lt;/code&gt;<a name="line.140"></a>
+<span class="sourceLineNo">141</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;jk&gt;true&lt;/jk&gt;<a name="line.141"></a>
+<span class="sourceLineNo">142</span>    * &lt;/ul&gt;<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    * &lt;p&gt;<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    * When enabled, the number of times an exception has occurred will be determined based on stack trace hashsums,<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    *    made available through the {@link RestException#getOccurrence()} method.<a name="line.145"></a>
+<span class="sourceLineNo">146</span>    * &lt;p&gt;<a name="line.146"></a>
+<span class="sourceLineNo">147</span>    * Applicable to servlet class only.<a name="line.147"></a>
+<span class="sourceLineNo">148</span>    */<a name="line.148"></a>
+<span class="sourceLineNo">149</span>   public static final String REST_useStackTraceHashes = "RestServlet.useStackTraceHashes";<a name="line.149"></a>
+<span class="sourceLineNo">150</span><a name="line.150"></a>
+<span class="sourceLineNo">151</span>   /**<a name="line.151"></a>
+<span class="sourceLineNo">152</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Default character encoding.<a name="line.152"></a>
+<span class="sourceLineNo">153</span>    * &lt;p&gt;<a name="line.153"></a>
+<span class="sourceLineNo">154</span>    * &lt;ul&gt;<a name="line.154"></a>
+<span class="sourceLineNo">155</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.defaultCharset"&lt;/js&gt;<a name="line.155"></a>
+<span class="sourceLineNo">156</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;String&lt;/code&gt;<a name="line.156"></a>
+<span class="sourceLineNo">157</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;js&gt;"utf-8"&lt;/js&gt;<a name="line.157"></a>
+<span class="sourceLineNo">158</span>    * &lt;/ul&gt;<a name="line.158"></a>
 <span class="sourceLineNo">159</span>    * &lt;p&gt;<a name="line.159"></a>
-<span class="sourceLineNo">160</span>    * Applicable to servlet class and methods.<a name="line.160"></a>
-<span class="sourceLineNo">161</span>    */<a name="line.161"></a>
-<span class="sourceLineNo">162</span>   public static final String REST_defaultCharset = "RestServlet.defaultCharset";<a name="line.162"></a>
-<span class="sourceLineNo">163</span><a name="line.163"></a>
-<span class="sourceLineNo">164</span>   /**<a name="line.164"></a>
-<span class="sourceLineNo">165</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Expected format of request parameters.<a name="line.165"></a>
-<span class="sourceLineNo">166</span>    * &lt;p&gt;<a name="line.166"></a>
-<span class="sourceLineNo">167</span>    * &lt;ul&gt;<a name="line.167"></a>
-<span class="sourceLineNo">168</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.paramFormat"&lt;/js&gt;<a name="line.168"></a>
-<span class="sourceLineNo">169</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;String&lt;/code&gt;<a name="line.169"></a>
-<span class="sourceLineNo">170</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;js&gt;"UON"&lt;/js&gt;<a name="line.170"></a>
-<span class="sourceLineNo">171</span>    * &lt;/ul&gt;<a name="line.171"></a>
-<span class="sourceLineNo">172</span>    * &lt;p&gt;<a name="line.172"></a>
-<span class="sourceLineNo">173</span>    * Possible values:<a name="line.173"></a>
-<span class="sourceLineNo">174</span>    * &lt;ul class='spaced-list'&gt;<a name="line.174"></a>
-<span class="sourceLineNo">175</span>    *    &lt;li&gt;&lt;js&gt;"UON"&lt;/js&gt; - URL-Encoded Object Notation.&lt;br&gt;<a name="line.175"></a>
-<span class="sourceLineNo">176</span>    *       This notation allows for request parameters to contain arbitrarily complex POJOs.<a name="line.176"></a>
-<span class="sourceLineNo">177</span>    *    &lt;li&gt;&lt;js&gt;"PLAIN"&lt;/js&gt; - Plain text.&lt;br&gt;<a name="line.177"></a>
-<span class="sourceLineNo">178</span>    *       This treats request parameters as plain text.&lt;br&gt;<a name="line.178"></a>
-<span class="sourceLineNo">179</span>    *       Only POJOs directly convertable from &lt;l&gt;Strings&lt;/l&gt; can be represented in parameters when using this mode.<a name="line.179"></a>
-<span class="sourceLineNo">180</span>    * &lt;/ul&gt;<a name="line.180"></a>
-<span class="sourceLineNo">181</span>    * &lt;p&gt;<a name="line.181"></a>
-<span class="sourceLineNo">182</span>    * Note that the parameter value &lt;js&gt;"(foo)"&lt;/js&gt; is interpreted as &lt;js&gt;"(foo)"&lt;/js&gt; when using plain mode, but<a name="line.182"></a>
-<span class="sourceLineNo">183</span>    *    &lt;js&gt;"foo"&lt;/js&gt; when using UON mode.<a name="line.183"></a>
-<span class="sourceLineNo">184</span>    * &lt;p&gt;<a name="line.184"></a>
-<span class="sourceLineNo">185</span>    * The format can also be specified per-parameter using the {@link FormData#format() @FormData.format()} and {@link Query#format() @Query.format()}<a name="line.185"></a>
-<span class="sourceLineNo">186</span>    *    annotations.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    * &lt;p&gt;<a name="line.187"></a>
-<span class="sourceLineNo">188</span>    * Applicable to servlet class and methods.<a name="line.188"></a>
-<span class="sourceLineNo">189</span>    */<a name="line.189"></a>
-<span class="sourceLineNo">190</span>   public static final String REST_paramFormat = "RestServlet.paramFormat";<a name="line.190"></a>
-<span class="sourceLineNo">191</span><a name="line.191"></a>
-<span class="sourceLineNo">192</span><a name="line.192"></a>
-<span class="sourceLineNo">193</span>   //--------------------------------------------------------------------------------<a name="line.193"></a>
-<span class="sourceLineNo">194</span>   // Automatically added properties.<a name="line.194"></a>
+<span class="sourceLineNo">160</span>    * The default character encoding for the request and response if not specified on the request.<a name="line.160"></a>
+<span class="sourceLineNo">161</span>    * &lt;p&gt;<a name="line.161"></a>
+<span class="sourceLineNo">162</span>    * Applicable to servlet class and methods.<a name="line.162"></a>
+<span class="sourceLineNo">163</span>    */<a name="line.163"></a>
+<span class="sourceLineNo">164</span>   public static final String REST_defaultCharset = "RestServlet.defaultCharset";<a name="line.164"></a>
+<span class="sourceLineNo">165</span><a name="line.165"></a>
+<span class="sourceLineNo">166</span>   /**<a name="line.166"></a>
+<span class="sourceLineNo">167</span>    * &lt;b&gt;Configuration property:&lt;/b&gt;  Expected format of request parameters.<a name="line.167"></a>
+<span class="sourceLineNo">168</span>    * &lt;p&gt;<a name="line.168"></a>
+<span class="sourceLineNo">169</span>    * &lt;ul&gt;<a name="line.169"></a>
+<span class="sourceLineNo">170</span>    *    &lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; &lt;js&gt;"RestServlet.paramFormat"&lt;/js&gt;<a name="line.170"></a>
+<span class="sourceLineNo">171</span>    *    &lt;li&gt;&lt;b&gt;Data type:&lt;/b&gt; &lt;code&gt;String&lt;/code&gt;<a name="line.171"></a>
+<span class="sourceLineNo">172</span>    *    &lt;li&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;js&gt;"UON"&lt;/js&gt;<a name="line.172"></a>
+<span class="sourceLineNo">173</span>    * &lt;/ul&gt;<a name="line.173"></a>
+<span class="sourceLineNo">174</span>    * &lt;p&gt;<a name="line.174"></a>
+<span class="sourceLineNo">175</span>    * Possible values:<a name="line.175"></a>
+<span class="sourceLineNo">176</span>    * &lt;ul class='spaced-list'&gt;<a name="line.176"></a>
+<span class="sourceLineNo">177</span>    *    &lt;li&gt;&lt;js&gt;"UON"&lt;/js&gt; - URL-Encoded Object Notation.&lt;br&gt;<a name="line.177"></a>
+<span class="sourceLineNo">178</span>    *       This notation allows for request parameters to contain arbitrarily complex POJOs.<a name="line.178"></a>
+<span class="sourceLineNo">179</span>    *    &lt;li&gt;&lt;js&gt;"PLAIN"&lt;/js&gt; - Plain text.&lt;br&gt;<a name="line.179"></a>
+<span class="sourceLineNo">180</span>    *       This treats request parameters as plain text.&lt;br&gt;<a name="line.180"></a>
+<span class="sourceLineNo">181</span>    *       Only POJOs directly convertable from &lt;l&gt;Strings&lt;/l&gt; can be represented in parameters when using this mode.<a name="line.181"></a>
+<span class="sourceLineNo">182</span>    * &lt;/ul&gt;<a name="line.182"></a>
+<span class="sourceLineNo">183</span>    * &lt;p&gt;<a name="line.183"></a>
+<span class="sourceLineNo">184</span>    * Note that the parameter value &lt;js&gt;"(foo)"&lt;/js&gt; is interpreted as &lt;js&gt;"(foo)"&lt;/js&gt; when using plain mode, but<a name="line.184"></a>
+<span class="sourceLineNo">185</span>    *    &lt;js&gt;"foo"&lt;/js&gt; when using UON mode.<a name="line.185"></a>
+<span class="sourceLineNo">186</span>    * &lt;p&gt;<a name="line.186"></a>
+<span class="sourceLineNo">187</span>    * The format can also be specified per-parameter using the {@link FormData#format() @FormData.format()} and {@link Query#format() @Query.format()}<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    *    annotations.<a name="line.188"></a>
+<span class="sourceLineNo">189</span>    * &lt;p&gt;<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    * Applicable to servlet class and methods.<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    */<a name="line.191"></a>
+<span class="sourceLineNo">192</span>   public static final String REST_paramFormat = "RestServlet.paramFormat";<a name="line.192"></a>
+<span class="sourceLineNo">193</span><a name="line.193"></a>
+<span class="sourceLineNo">194</span><a name="line.194"></a>
 <span class="sourceLineNo">195</span>   //--------------------------------------------------------------------------------<a name="line.195"></a>
-<span class="sourceLineNo">196</span><a name="line.196"></a>
-<span class="sourceLineNo">197</span>   /**<a name="line.197"></a>
-<span class="sourceLineNo">198</span>    * The request servlet path.<a name="line.198"></a>
-<span class="sourceLineNo">199</span>    * &lt;p&gt;<a name="line.199"></a>
-<span class="sourceLineNo">200</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.200"></a>
+<span class="sourceLineNo">196</span>   // Automatically added properties.<a name="line.196"></a>
+<span class="sourceLineNo">197</span>   //--------------------------------------------------------------------------------<a name="line.197"></a>
+<span class="sourceLineNo">198</span><a name="line.198"></a>
+<span class="sourceLineNo">199</span>   /**<a name="line.199"></a>
+<span class="sourceLineNo">200</span>    * The request servlet path.<a name="line.200"></a>
 <span class="sourceLineNo">201</span>    * &lt;p&gt;<a name="line.201"></a>
-<span class="sourceLineNo">202</span>    * Equivalent to the value returned by {@link RestRequest#getServletPath()}<a name="line.202"></a>
-<span class="sourceLineNo">203</span>    */<a name="line.203"></a>
-<span class="sourceLineNo">204</span>   public static final String REST_servletPath = "RestServlet.servletPath";<a name="line.204"></a>
-<span class="sourceLineNo">205</span><a name="line.205"></a>
-<span class="sourceLineNo">206</span>   /**<a name="line.206"></a>
-<span class="sourceLineNo">207</span>    * The request servlet URI.<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    * &lt;p&gt;<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    * Equivalent to the value returned by {@link RestRequest#getServletURI()}<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    */<a name="line.210"></a>
-<span class="sourceLineNo">211</span>   public static final String REST_servletURI = "RestServlet.servletURI";<a name="line.211"></a>
-<span class="sourceLineNo">212</span><a name="line.212"></a>
-<span class="sourceLineNo">213</span>   /**<a name="line.213"></a>
-<span class="sourceLineNo">214</span>    * The request servlet URI.<a name="line.214"></a>
-<span class="sourceLineNo">215</span>    * &lt;p&gt;<a name="line.215"></a>
-<span class="sourceLineNo">216</span>    * Equivalent to the value returned by {@link RestRequest#getRelativeServletURI()}<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    */<a name="line.217"></a>
-<span class="sourceLineNo">218</span>   public static final String REST_relativeServletURI = "RestServlet.relativeServletURI";<a name="line.218"></a>
-<span class="sourceLineNo">219</span><a name="line.219"></a>
-<span class="sourceLineNo">220</span>   /**<a name="line.220"></a>
-<span class="sourceLineNo">221</span>    * The request URI path info.<a name="line.221"></a>
-<span class="sourceLineNo">222</span>    * &lt;p&gt;<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.223"></a>
+<span class="sourceLineNo">202</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.202"></a>
+<span class="sourceLineNo">203</span>    * &lt;p&gt;<a name="line.203"></a>
+<span class="sourceLineNo">204</span>    * Equivalent to the value returned by {@link RestRequest#getServletPath()}<a name="line.204"></a>
+<span class="sourceLineNo">205</span>    */<a name="line.205"></a>
+<span class="sourceLineNo">206</span>   public static final String REST_servletPath = "RestServlet.servletPath";<a name="line.206"></a>
+<span class="sourceLineNo">207</span><a name="line.207"></a>
+<span class="sourceLineNo">208</span>   /**<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    * The request servlet URI.<a name="line.209"></a>
+<span class="sourceLineNo">210</span>    * &lt;p&gt;<a name="line.210"></a>
+<span class="sourceLineNo">211</span>    * Equivalent to the value returned by {@link RestRequest#getServletURI()}<a name="line.211"></a>
+<span class="sourceLineNo">212</span>    */<a name="line.212"></a>
+<span class="sourceLineNo">213</span>   public static final String REST_servletURI = "RestServlet.servletURI";<a name="line.213"></a>
+<span class="sourceLineNo">214</span><a name="line.214"></a>
+<span class="sourceLineNo">215</span>   /**<a name="line.215"></a>
+<span class="sourceLineNo">216</span>    * The request servlet URI.<a name="line.216"></a>
+<span class="sourceLineNo">217</span>    * &lt;p&gt;<a name="line.217"></a>
+<span class="sourceLineNo">218</span>    * Equivalent to the value returned by {@link RestRequest#getRelativeServletURI()}<a name="line.218"></a>
+<span class="sourceLineNo">219</span>    */<a name="line.219"></a>
+<span class="sourceLineNo">220</span>   public static final String REST_relativeServletURI = "RestServlet.relativeServletURI";<a name="line.220"></a>
+<span class="sourceLineNo">221</span><a name="line.221"></a>
+<span class="sourceLineNo">222</span>   /**<a name="line.222"></a>
+<span class="sourceLineNo">223</span>    * The request URI path info.<a name="line.223"></a>
 <span class="sourceLineNo">224</span>    * &lt;p&gt;<a name="line.224"></a>
-<span class="sourceLineNo">225</span>    * Equivalent to the value returned by {@link RestRequest#getPathInfo()}<a name="line.225"></a>
-<span class="sourceLineNo">226</span>    */<a name="line.226"></a>
-<span class="sourceLineNo">227</span>   public static final String REST_pathInfo = "RestServlet.pathInfo";<a name="line.227"></a>
-<span class="sourceLineNo">228</span><a name="line.228"></a>
-<span class="sourceLineNo">229</span>   /**<a name="line.229"></a>
-<span class="sourceLineNo">230</span>    * The request URI.<a name="line.230"></a>
-<span class="sourceLineNo">231</span>    * &lt;p&gt;<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.232"></a>
+<span class="sourceLineNo">225</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.225"></a>
+<span class="sourceLineNo">226</span>    * &lt;p&gt;<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    * Equivalent to the value returned by {@link RestRequest#getPathInfo()}<a name="line.227"></a>
+<span class="sourceLineNo">228</span>    */<a name="line.228"></a>
+<span class="sourceLineNo">229</span>   public static final String REST_pathInfo = "RestServlet.pathInfo";<a name="line.229"></a>
+<span class="sourceLineNo">230</span><a name="line.230"></a>
+<span class="sourceLineNo">231</span>   /**<a name="line.231"></a>
+<span class="sourceLineNo">232</span>    * The request URI.<a name="line.232"></a>
 <span class="sourceLineNo">233</span>    * &lt;p&gt;<a name="line.233"></a>
-<span class="sourceLineNo">234</span>    * Equivalent to the value returned by {@link RestRequest#getRequestURI()}<a name="line.234"></a>
-<span class="sourceLineNo">235</span>    */<a name="line.235"></a>
-<span class="sourceLineNo">236</span>   public static final String REST_requestURI = "RestServlet.requestURI";<a name="line.236"></a>
-<span class="sourceLineNo">237</span><a name="line.237"></a>
-<span class="sourceLineNo">238</span>   /**<a name="line.238"></a>
-<span class="sourceLineNo">239</span>    * The request method.<a name="line.239"></a>
-<span class="sourceLineNo">240</span>    * &lt;p&gt;<a name="line.240"></a>
-<span class="sourceLineNo">241</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.241"></a>
+<span class="sourceLineNo">234</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.234"></a>
+<span class="sourceLineNo">235</span>    * &lt;p&gt;<a name="line.235"></a>
+<span class="sourceLineNo">236</span>    * Equivalent to the value returned by {@link RestRequest#getRequestURI()}<a name="line.236"></a>
+<span class="sourceLineNo">237</span>    */<a name="line.237"></a>
+<span class="sourceLineNo">238</span>   public static final String REST_requestURI = "RestServlet.requestURI";<a name="line.238"></a>
+<span class="sourceLineNo">239</span><a name="line.239"></a>
+<span class="sourceLineNo">240</span>   /**<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    * The request method.<a name="line.241"></a>
 <span class="sourceLineNo">242</span>    * &lt;p&gt;<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    * Equivalent to the value returned by {@link RestRequest#getMethod()}<a name="line.243"></a>
-<span class="sourceLineNo">244</span>    */<a name="line.244"></a>
-<span class="sourceLineNo">245</span>   public static final String REST_method = "RestServlet.method";<a name="line.245"></a>
-<span class="sourceLineNo">246</span><a name="line.246"></a>
-<span class="sourceLineNo">247</span>   /**<a name="line.247"></a>
-<span class="sourceLineNo">248</span>    * The localized servlet title.<a name="line.248"></a>
-<span class="sourceLineNo">249</span>    * &lt;p&gt;<a name="line.249"></a>
-<span class="sourceLineNo">250</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.250"></a>
+<span class="sourceLineNo">243</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.243"></a>
+<span class="sourceLineNo">244</span>    * &lt;p&gt;<a name="line.244"></a>
+<span class="sourceLineNo">245</span>    * Equivalent to the value returned by {@link RestRequest#getMethod()}<a name="line.245"></a>
+<span class="sourceLineNo">246</span>    */<a name="line.246"></a>
+<span class="sourceLineNo">247</span>   public static final String REST_method = "RestServlet.method";<a name="line.247"></a>
+<span class="sourceLineNo">248</span><a name="line.248"></a>
+<span class="sourceLineNo">249</span>   /**<a name="line.249"></a>
+<span class="sourceLineNo">250</span>    * The localized servlet title.<a name="line.250"></a>
 <span class="sourceLineNo">251</span>    * &lt;p&gt;<a name="line.251"></a>
-<span class="sourceLineNo">252</span>    * Equivalent to the value returned by {@link RestRequest#getServletTitle()}<a name="line.252"></a>
-<span class="sourceLineNo">253</span>    */<a name="line.253"></a>
-<span class="sourceLineNo">254</span>   public static final String REST_servletTitle = "RestServlet.servletTitle";<a name="line.254"></a>
-<span class="sourceLineNo">255</span><a name="line.255"></a>
-<span class="sourceLineNo">256</span>   /**<a name="line.256"></a>
-<span class="sourceLineNo">257</span>    * The localized servlet description.<a name="line.257"></a>
-<span class="sourceLineNo">258</span>    * &lt;p&gt;<a name="line.258"></a>
-<span class="sourceLineNo">259</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.259"></a>
+<span class="sourceLineNo">252</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.252"></a>
+<span class="sourceLineNo">253</span>    * &lt;p&gt;<a name="line.253"></a>
+<span class="sourceLineNo">254</span>    * Equivalent to the value returned by {@link RestRequest#getServletTitle()}<a name="line.254"></a>
+<span class="sourceLineNo">255</span>    */<a name="line.255"></a>
+<span class="sourceLineNo">256</span>   public static final String REST_servletTitle = "RestServlet.servletTitle";<a name="line.256"></a>
+<span class="sourceLineNo">257</span><a name="line.257"></a>
+<span class="sourceLineNo">258</span>   /**<a name="line.258"></a>
+<span class="sourceLineNo">259</span>    * The localized servlet description.<a name="line.259"></a>
 <span class="sourceLineNo">260</span>    * &lt;p&gt;<a name="line.260"></a>
-<span class="sourceLineNo">261</span>    * Equivalent to the value returned by {@link RestRequest#getServletDescription()}<a name="line.261"></a>
-<span class="sourceLineNo">262</span>    */<a name="line.262"></a>
-<span class="sourceLineNo">263</span>   public static final String REST_servletDescription = "RestServlet.servletDescription";<a name="line.263"></a>
-<span class="sourceLineNo">264</span><a name="line.264"></a>
-<span class="sourceLineNo">265</span>   /**<a name="line.265"></a>
-<span class="sourceLineNo">266</span>    * The localized method summary.<a name="line.266"></a>
-<span class="sourceLineNo">267</span>    * &lt;p&gt;<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.268"></a>
+<span class="sourceLineNo">261</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.261"></a>
+<span class="sourceLineNo">262</span>    * &lt;p&gt;<a name="line.262"></a>
+<span class="sourceLineNo">263</span>    * Equivalent to the value returned by {@link RestRequest#getServletDescription()}<a name="line.263"></a>
+<span class="sourceLineNo">264</span>    */<a name="line.264"></a>
+<span class="sourceLineNo">265</span>   public static final String REST_servletDescription = "RestServlet.servletDescription";<a name="line.265"></a>
+<span class="sourceLineNo">266</span><a name="line.266"></a>
+<span class="sourceLineNo">267</span>   /**<a name="line.267"></a>
+<span class="sourceLineNo">268</span>    * The localized method summary.<a name="line.268"></a>
 <span class="sourceLineNo">269</span>    * &lt;p&gt;<a name="line.269"></a>
-<span class="sourceLineNo">270</span>    * Equivalent to the value returned by {@link RestRequest#getMethodSummary()}<a name="line.270"></a>
-<span class="sourceLineNo">271</span>    */<a name="line.271"></a>
-<span class="sourceLineNo">272</span>   public static final String REST_methodSummary = "RestServlet.methodSummary";<a name="line.272"></a>
-<span class="sourceLineNo">273</span><a name="line.273"></a>
-<span class="sourceLineNo">274</span>   /**<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    * The localized method description.<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    * &lt;p&gt;<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.277"></a>
+<span class="sourceLineNo">270</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.270"></a>
+<span class="sourceLineNo">271</span>    * &lt;p&gt;<a name="line.271"></a>
+<span class="sourceLineNo">272</span>    * Equivalent to the value returned by {@link RestRequest#getMethodSummary()}<a name="line.272"></a>
+<span class="sourceLineNo">273</span>    */<a name="line.273"></a>
+<span class="sourceLineNo">274</span>   public static final String REST_methodSummary = "RestServlet.methodSummary";<a name="line.274"></a>
+<span class="sourceLineNo">275</span><a name="line.275"></a>
+<span class="sourceLineNo">276</span>   /**<a name="line.276"></a>
+<span class="sourceLineNo">277</span>    * The localized method description.<a name="line.277"></a>
 <span class="sourceLineNo">278</span>    * &lt;p&gt;<a name="line.278"></a>
-<span class="sourceLineNo">279</span>    * Equivalent to the value returned by {@link RestRequest#getMethodDescription()}<a name="line.279"></a>
-<span class="sourceLineNo">280</span>    */<a name="line.280"></a>
-<span class="sourceLineNo">281</span>   public static final String REST_methodDescription = "RestServlet.methodDescription";<a name="line.281"></a>
-<span class="sourceLineNo">282</span><a name="line.282"></a>
-<span class="sourceLineNo">283</span><a name="line.283"></a>
-<span class="sourceLineNo">284</span>   private final Object resource;<a name="line.284"></a>
-<span class="sourceLineNo">285</span>   private final RestConfig config;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>   private final boolean<a name="line.286"></a>
-<span class="sourceLineNo">287</span>      allowHeaderParams,<a name="line.287"></a>
-<span class="sourceLineNo">288</span>      allowBodyParam,<a name="line.288"></a>
-<span class="sourceLineNo">289</span>      renderResponseStackTraces,<a name="line.289"></a>
-<span class="sourceLineNo">290</span>      useStackTraceHashes;<a name="line.290"></a>
-<span class="sourceLineNo">291</span>   private final String<a name="line.291"></a>
-<span class="sourceLineNo">292</span>      defaultCharset,<a name="line.292"></a>
-<span class="sourceLineNo">293</span>      paramFormat,<a name="line.293"></a>
-<span class="sourceLineNo">294</span>      clientVersionHeader,<a name="line.294"></a>
-<span class="sourceLineNo">295</span>      fullPath,<a name="line.295"></a>
-<span class="sourceLineNo">296</span>      pageTitle, pageText, pageLinks;<a name="line.296"></a>
-<span class="sourceLineNo">297</span>   private final Set&lt;String&gt; allowMethodParams;<a name="line.297"></a>
-<span class="sourceLineNo">298</span><a name="line.298"></a>
-<span class="sourceLineNo">299</span>   private final ObjectMap properties;<a name="line.299"></a>
-<span class="sourceLineNo">300</span>   private final Class&lt;?&gt;[]<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      beanFilters,<a name="line.301"></a>
-<span class="sourceLineNo">302</span>      pojoSwaps;<a name="line.302"></a>
-<span class="sourceLineNo">303</span>   private final SerializerGroup serializers;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>   private final ParserGroup parsers;<a name="line.304"></a>
-<span class="sourceLineNo">305</span>   private final UrlEncodingSerializer urlEncodingSerializer;<a name="line.305"></a>
-<span class="sourceLineNo">306</span>   private final UrlEncodingParser urlEncodingParser;<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   private final EncoderGroup encoders;<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   private final MediaType[]<a name="line.308"></a>
-<span class="sourceLineNo">309</span>      supportedContentTypes,<a name="line.309"></a>
-<span class="sourceLineNo">310</span>      supportedAcceptTypes;<a name="line.310"></a>
-<span class="sourceLineNo">311</span>   private final Map&lt;String,String&gt; defaultRequestHeaders;<a name="line.311"></a>
-<span class="sourceLineNo">312</span>   private final Map&lt;String,Object&gt; defaultResponseHeaders;<a name="line.312"></a>
-<span class="sourceLineNo">313</span>   private final BeanContext beanContext;<a name="line.313"></a>
-<span class="sourceLineNo">314</span>   private final RestConverter[] converters;<a name="line.314"></a>
-<span class="sourceLineNo">315</span>   private final RestGuard[] guards;<a name="line.315"></a>
-<span class="sourceLineNo">316</span>   private final ResponseHandler[] responseHandlers;<a name="line.316"></a>
-<span class="sourceLineNo">317</span>   private final MimetypesFileTypeMap mimetypesFileTypeMap;<a name="line.317"></a>
-<span class="sourceLineNo">318</span>   private final StreamResource styleSheet, favIcon;<a name="line.318"></a>
-<span class="sourceLineNo">319</span>   private final Map&lt;String,String&gt; staticFilesMap;<a name="line.319"></a>
-<span class="sourceLineNo">320</span>   private final String[] staticFilesPrefixes;<a name="line.320"></a>
-<span class="sourceLineNo">321</span>   private final MessageBundle msgs;<a name="line.321"></a>
-<span class="sourceLineNo">322</span>   private final ConfigFile configFile;<a name="line.322"></a>
-<span class="sourceLineNo">323</span>   private final VarResolver varResolver;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>   private final Map&lt;String,CallRouter&gt; callRouters;<a name="line.324"></a>
-<span class="sourceLineNo">325</span>   private final Map&lt;String,CallMethod&gt; callMethods;<a name="line.325"></a>
-<span class="sourceLineNo">326</span>   private final Map&lt;String,RestContext&gt; childResources;<a name="line.326"></a>
-<span class="sourceLineNo">327</span>   private final RestLogger logger;<a name="line.327"></a>
-<span class="sourceLineNo">328</span>   private final RestCallHandler callHandler;<a name="line.328"></a>
-<span class="sourceLineNo">329</span>   private final RestInfoProvider infoProvider;<a name="line.329"></a>
-<span class="sourceLineNo">330</span>   private final RestException initException;<a name="line.330"></a>
-<span class="sourceLineNo">331</span>   private final RestContext parentContext;<a name="line.331"></a>
-<span class="sourceLineNo">332</span><a name="line.332"></a>
-<span class="sourceLineNo">333</span>   // In-memory cache of images and stylesheets in the org.apache.juneau.rest.htdocs package.<a name="line.333"></a>
-<span class="sourceLineNo">334</span>   private final Map&lt;String,StreamResource&gt; staticFilesCache = new ConcurrentHashMap&lt;String,StreamResource&gt;();<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   private final Map&lt;String,byte[]&gt; resourceStreams = new ConcurrentHashMap&lt;String,byte[]&gt;();<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   private final Map&lt;String,String&gt; resourceStrings = new ConcurrentHashMap&lt;String,String&gt;();<a name="line.336"></a>
-<span class="sourceLineNo">337</span>   private final ConcurrentHashMap&lt;Integer,AtomicInteger&gt; stackTraceHashes = new ConcurrentHashMap&lt;Integer,AtomicInteger&gt;();<a name="line.337"></a>
-<span class="sourceLineNo">338</span><a name="line.338"></a>
-<span class="sourceLineNo">339</span><a name="line.339"></a>
-<span class="sourceLineNo">340</span>   /**<a name="line.340"></a>
-<span class="sourceLineNo">341</span>    * Constructor.<a name="line.341"></a>
-<span class="sourceLineNo">342</span>    *<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    * @param resource The resource class (a class annotated with {@link RestResource @RestResource}).<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    * @param config The servlet configuration object.<a name="line.344"></a>
-<span class="sourceLineNo">345</span>    * @throws Exception If any initialization problems were encountered.<a name="line.345"></a>
-<span class="sourceLineNo">346</span>    */<a name="line.346"></a>
-<span class="sourceLineNo">347</span>   @SuppressWarnings("unchecked")<a name="line.347"></a>
-<span class="sourceLineNo">348</span>   public RestContext(Object resource, RestConfig config) throws Exception {<a name="line.348"></a>
-<span class="sourceLineNo">349</span>      super(null);<a name="line.349"></a>
-<span class="sourceLineNo">350</span>      RestException _initException = null;<a name="line.350"></a>
-<span class="sourceLineNo">351</span>      try {<a name="line.351"></a>
-<span class="sourceLineNo">352</span>         this.resource = resource;<a name="line.352"></a>
-<span class="sourceLineNo">353</span>         this.config = config;<a name="line.353"></a>
-<span class="sourceLineNo">354</span>         this.parentContext = config.parentContext;<a name="line.354"></a>
-<span class="sourceLineNo">355</span><a name="line.355"></a>
-<span class="sourceLineNo">356</span>         Builder b = new Builder(resource, config);<a name="line.356"></a>
-<span class="sourceLineNo">357</span>         this.allowHeaderParams = b.allowHeaderParams;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>         this.allowBodyParam = b.allowBodyParam;<a name="line.358"></a>
-<span class="sourceLineNo">359</span>         this.renderResponseStackTraces = b.renderResponseStackTraces;<a name="line.359"></a>
-<span class="sourceLineNo">360</span>         this.useStackTraceHashes = b.useStackTraceHashes;<a name="line.360"></a>
-<span class="sourceLineNo">361</span>         this.allowMethodParams = Collections.unmodifiableSet(b.allowMethodParams);<a name="line.361"></a>
-<span class="sourceLineNo">362</span>         this.defaultCharset = b.defaultCharset;<a name="line.362"></a>
-<span class="sourceLineNo">363</span>         this.paramFormat = b.paramFormat;<a name="line.363"></a>
-<span class="sourceLineNo">364</span>         this.varResolver = b.varResolver;<a name="line.364"></a>
-<span class="sourceLineNo">365</span>         this.configFile = b.configFile;<a name="line.365"></a>
-<span class="sourceLineNo">366</span>         this.properties = b.properties;<a name="line.366"></a>
-<span class="sourceLineNo">367</span>         this.beanFilters = b.beanFilters;<a name="line.367"></a>
-<span class="sourceLineNo">368</span>         this.pojoSwaps = b.pojoSwaps;<a name="line.368"></a>
-<span class="sourceLineNo">369</span>         this.serializers = b.serializers;<a name="line.369"></a>
-<span class="sourceLineNo">370</span>         this.parsers = b.parsers;<a name="line.370"></a>
-<span class="sourceLineNo">371</span>         this.urlEncodingSerializer = b.urlEncodingSerializer;<a name="line.371"></a>
-<span class="sourceLineNo">372</span>         this.urlEncodingParser = b.urlEncodingParser;<a name="line.372"></a>
-<span class="sourceLineNo">373</span>         this.encoders = b.encoders;<a name="line.373"></a>
-<span class="sourceLineNo">374</span>         this.supportedContentTypes = ArrayUtils.toObjectArray(b.supportedContentTypes, MediaType.class);<a name="line.374"></a>
-<span class="sourceLineNo">375</span>         this.supportedAcceptTypes = ArrayUtils.toObjectArray(b.supportedAcceptTypes, MediaType.class);<a name="line.375"></a>
-<span class="sourceLineNo">376</span>         this.clientVersionHeader = b.clientVersionHeader;<a name="line.376"></a>
-<span class="sourceLineNo">377</span>         this.defaultRequestHeaders = Collections.unmodifiableMap(b.defaultRequestHeaders);<a name="line.377"></a>
-<span class="sourceLineNo">378</span>         this.defaultResponseHeaders = Collections.unmodifiableMap(b.defaultResponseHeaders);<a name="line.378"></a>
-<span class="sourceLineNo">379</span>         this.beanContext = b.beanContext;<a name="line.379"></a>
-<span class="sourceLineNo">380</span>         this.converters = b.converters.toArray(new RestConverter[b.converters.size()]);<a name="line.380"></a>
-<span class="sourceLineNo">381</span>         this.guards = b.guards.toArray(new RestGuard[b.guards.size()]);<a name="line.381"></a>
-<span class="sourceLineNo">382</span>         this.responseHandlers = ArrayUtils.toObjectArray(b.responseHandlers, ResponseHandler.class);<a name="line.382"></a>
-<span class="sourceLineNo">383</span>         this.mimetypesFileTypeMap = b.mimetypesFileTypeMap;<a name="line.383"></a>
-<span class="sourceLineNo">384</span>         this.styleSheet = b.styleSheet;<a name="line.384"></a>
-<span class="sourceLineNo">385</span>         this.favIcon = b.favIcon;<a name="line.385"></a>
-<span class="sourceLineNo">386</span>         this.staticFilesMap = Collections.unmodifiableMap(b.staticFilesMap);<a name="line.386"></a>
-<span class="sourceLineNo">387</span>         this.staticFilesPrefixes = b.staticFilesPrefixes;<a name="line.387"></a>
-<span class="sourceLineNo">388</span>         this.msgs = b.messageBundle;<a name="line.388"></a>
-<span class="sourceLineNo">389</span>         this.childResources = Collections.synchronizedMap(new LinkedHashMap&lt;String,RestContext&gt;());  // Not unmodifiable on purpose so that children can be replaced.<a name="line.389"></a>
-<span class="sourceLineNo">390</span>         this.logger = b.logger;<a name="line.390"></a>
-<span class="sourceLineNo">391</span>         this.fullPath = b.fullPath;<a name="line.391"></a>
-<span class="sourceLineNo">392</span>         this.pageTitle = b.pageTitle;<a name="line.392"></a>
-<span class="sourceLineNo">393</span>         this.pageText = b.pageText;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>         this.pageLinks = b.pageLinks;<a name="line.394"></a>
-<span class="sourceLineNo">395</span><a name="line.395"></a>
-<span class="sourceLineNo">396</span>         //----------------------------------------------------------------------------------------------------<a name="line.396"></a>
-<span class="sourceLineNo">397</span>         // Initialize the child resources.<a name="line.397"></a>
-<span class="sourceLineNo">398</span>         // Done after initializing fields above since we pass this object to the child resources.<a name="line.398"></a>
-<span class="sourceLineNo">399</span>         //----------------------------------------------------------------------------------------------------<a name="line.399"></a>
-<span class="sourceLineNo">400</span>         List&lt;String&gt; methodsFound = new LinkedList&lt;String&gt;();   // Temporary to help debug transient duplicate method issue.<a name="line.400"></a>
-<span class="sourceLineNo">401</span>         Map&lt;String,CallRouter.Builder&gt; routers = new LinkedHashMap&lt;String,CallRouter.Builder&gt;();<a name="line.401"></a>
-<span class="sourceLineNo">402</span>         Map&lt;String,CallMethod&gt; _javaRestMethods = new LinkedHashMap&lt;String,CallMethod&gt;();<a name="line.402"></a>
-<span class="sourceLineNo">403</span>         for (java.lang.reflect.Method method : resource.getClass().getMethods()) {<a name="line.403"></a>
-<span class="sourceLineNo">404</span>            if (method.isAnnotationPresent(RestMethod.class)) {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>               RestMethod a = method.getAnnotation(RestMethod.class);<a name="line.405"></a>
-<span class="sourceLineNo">406</span>               methodsFound.add(method.getName() + "," + a.name() + "," + a.path());<a name="line.406"></a>
-<span class="sourceLineNo">407</span>               try {<a name="line.407"></a>
-<span class="sourceLineNo">408</span>                  if (! Modifier.isPublic(method.getModifiers()))<a name="line.408"></a>
-<span class="sourceLineNo">409</span>                     throw new RestServletException("@RestMethod method {0}.{1} must be defined as public.", this.getClass().getName(), method.getName());<a name="line.409"></a>
-<span class="sourceLineNo">410</span><a name="line.410"></a>
-<span class="sourceLineNo">411</span>                  CallMethod sm = new CallMethod(resource, method, this);<a name="line.411"></a>
-<span class="sourceLineNo">412</span>                  String httpMethod = sm.getHttpMethod();<a name="line.412"></a>
-<span class="sourceLineNo">413</span><a name="line.413"></a>
-<span class="sourceLineNo">414</span>                  // PROXY is a special case where a method returns an interface that we<a name="line.414"></a>
-<span class="sourceLineNo">415</span>                  // can perform REST calls against.<a name="line.415"></a>
-<span class="sourceLineNo">416</span>                  // We override the CallMethod.invoke() method to insert our logic.<a name="line.416"></a>
-<span class="sourceLineNo">417</span>                  if ("PROXY".equals(httpMethod)) {<a name="line.417"></a>
-<span class="sourceLineNo">418</span><a name="line.418"></a>
-<span class="sourceLineNo">419</span>                     final ClassMeta&lt;?&gt; interfaceClass = beanContext.getClassMeta(method.getGenericReturnType());<a name="line.419"></a>
-<span class="sourceLineNo">420</span>                     final Map&lt;String,Method&gt; remoteableMethods = interfaceClass.getRemoteableMethods();<a name="line.420"></a>
-<span class="sourceLineNo">421</span>                     if (remoteableMethods.isEmpty())<a name="line.421"></a>
-<span class="sourceLineNo">422</span>                        throw new RestException(SC_INTERNAL_SERVER_ERROR, "Method {0} returns an interface {1} that doesn't define any remoteable methods.", ClassUtils.getMethodSignature(method), interfaceClass.getReadableName());<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span>                     sm = new CallMethod(resource, method, this) {<a name="line.424"></a>
-<span class="sourceLineNo">425</span><a name="line.425"></a>
-<span class="sourceLineNo">426</span>                        @Override<a name="line.426"></a>
-<span class="sourceLineNo">427</span>                        int invoke(String pathInfo, RestRequest req, RestResponse res) throws RestException {<a name="line.427"></a>
-<span class="sourceLineNo">428</span><a name="line.428"></a>
-<span class="sourceLineNo">429</span>                           int rc = super.invoke(pathInfo, req, res);<a name="line.429"></a>
-<span class="sourceLineNo">430</span>                           if (rc != SC_OK)<a name="line.430"></a>
-<span class="sourceLineNo">431</span>                              return rc;<a name="line.431"></a>
+<span class="sourceLineNo">279</span>    * Automatically added to properties returned by {@link SerializerSession#getProperties()} and {@link ParserSession#getProperties()}.<a name="line.279"></a>
+<span class="sourceLineNo">280</span>    * &lt;p&gt;<a name="line.280"></a>
+<span class="sourceLineNo">281</span>    * Equivalent to the value returned by {@link RestRequest#getMethodDescription()}<a name="line.281"></a>
+<span class="sourceLineNo">282</span>    */<a name="line.282"></a>
+<span class="sourceLineNo">283</span>   public static final String REST_methodDescription = "RestServlet.methodDescription";<a name="line.283"></a>
+<span class="sourceLineNo">284</span><a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>   private final Object resource;<a name="line.286"></a>
+<span class="sourceLineNo">287</span>   private final RestConfig config;<a name="line.287"></a>
+<span class="sourceLineNo">288</span>   private final boolean<a name="line.288"></a>
+<span class="sourceLineNo">289</span>      allowHeaderParams,<a name="line.289"></a>
+<span class="sourceLineNo">290</span>      allowBodyParam,<a name="line.290"></a>
+<span class="sourceLineNo">291</span>      renderResponseStackTraces,<a name="line.291"></a>
+<span class="sourceLineNo">292</span>      useStackTraceHashes;<a name="line.292"></a>
+<span class="sourceLineNo">293</span>   private final String<a name="line.293"></a>
+<span class="sourceLineNo">294</span>      defaultCharset,<a name="line.294"></a>
+<span class="sourceLineNo">295</span>      paramFormat,<a name="line.295"></a>
+<span class="sourceLineNo">296</span>      clientVersionHeader,<a name="line.296"></a>
+<span class="sourceLineNo">297</span>      fullPath,<a name="line.297"></a>
+<span class="sourceLineNo">298</span>      pageTitle, pageText, pageLinks;<a name="line.298"></a>
+<span class="sourceLineNo">299</span>   private final Set&lt;String&gt; allowMethodParams;<a name="line.299"></a>
+<span class="sourceLineNo">300</span><a name="line.300"></a>
+<span class="sourceLineNo">301</span>   private final ObjectMap properties;<a name="line.301"></a>
+<span class="sourceLineNo">302</span>   private final Class&lt;?&gt;[]<a name="line.302"></a>
+<span class="sourceLineNo">303</span>      beanFilters,<a name="line.303"></a>
+<span class="sourceLineNo">304</span>      pojoSwaps;<a name="line.304"></a>
+<span class="sourceLineNo">305</span>   private final Map&lt;Class&lt;?&gt;,RestParam&gt; paramResolvers;<a name="line.305"></a>
+<span class="sourceLineNo">306</span>   private final SerializerGroup serializers;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>   private final ParserGroup parsers;<a name="line.307"></a>
+<span class="sourceLineNo">308</span>   private final UrlEncodingSerializer urlEncodingSerializer;<a name="line.308"></a>
+<span class="sourceLineNo">309</span>   private final UrlEncodingParser urlEncodingParser;<a name="line.309"></a>
+<span class="sourceLineNo">310</span>   private final EncoderGroup encoders;<a name="line.310"></a>
+<span class="sourceLineNo">311</span>   private final MediaType[]<a name="line.311"></a>
+<span class="sourceLineNo">312</span>      supportedContentTypes,<a name="line.312"></a>
+<span class="sourceLineNo">313</span>      supportedAcceptTypes;<a name="line.313"></a>
+<span class="sourceLineNo">314</span>   private final Map&lt;String,String&gt; defaultRequestHeaders;<a name="line.314"></a>
+<span class="sourceLineNo">315</span>   private final Map&lt;String,Object&gt; defaultResponseHeaders;<a name="line.315"></a>
+<span class="sourceLineNo">316</span>   private final BeanContext beanContext;<a name="line.316"></a>
+<span class="sourceLineNo">317</span>   private final RestConverter[] converters;<a name="line.317"></a>
+<span class="sourceLineNo">318</span>   private final RestGuard[] guards;<a name="line.318"></a>
+<span class="sourceLineNo">319</span>   private final ResponseHandler[] responseHandlers;<a name="line.319"></a>
+<span class="sourceLineNo">320</span>   private final MimetypesFileTypeMap mimetypesFileTypeMap;<a name="line.320"></a>
+<span class="sourceLineNo">321</span>   private final StreamResource styleSheet, favIcon;<a name="line.321"></a>
+<span class="sourceLineNo">322</span>   private final Map&lt;String,String&gt; staticFilesMap;<a name="line.322"></a>
+<span class="sourceLineNo">323</span>   private final String[] staticFilesPrefixes;<a name="line.323"></a>
+<span class="sourceLineNo">324</span>   private final MessageBundle msgs;<a name="line.324"></a>
+<span class="sourceLineNo">325</span>   private final ConfigFile configFile;<a name="line.325"></a>
+<span class="sourceLineNo">326</span>   private final VarResolver varResolver;<a name="line.326"></a>
+<span class="sourceLineNo">327</span>   private final Map&lt;String,CallRouter&gt; callRouters;<a name="line.327"></a>
+<span class="sourceLineNo">328</span>   private final Map&lt;String,CallMethod&gt; callMethods;<a name="line.328"></a>
+<span class="sourceLineNo">329</span>   private final Map&lt;String,RestContext&gt; childResources;<a name="line.329"></a>
+<span class="sourceLineNo">330</span>   private final RestLogger logger;<a name="line.330"></a>
+<span class="sourceLineNo">331</span>   private final RestCallHandler callHandler;<a name="line.331"></a>
+<span class="sourceLineNo">332</span>   private final RestInfoProvider infoProvider;<a name="line.332"></a>
+<span class="sourceLineNo">333</span>   private final RestException initException;<a name="line.333"></a>
+<span class="sourceLineNo">334</span>   private final RestContext parentContext;<a name="line.334"></a>
+<span class="sourceLineNo">335</span><a name="line.335"></a>
+<span class="sourceLineNo">336</span>   // In-memory cache of images and stylesheets in the org.apache.juneau.rest.htdocs package.<a name="line.336"></a>
+<span class="sourceLineNo">337</span>   private final Map&lt;String,StreamResource&gt; staticFilesCache = new ConcurrentHashMap&lt;String,StreamResource&gt;();<a name="line.337"></a>
+<span class="sourceLineNo">338</span>   private final Map&lt;String,byte[]&gt; resourceStreams = new ConcurrentHashMap&lt;String,byte[]&gt;();<a name="line.338"></a>
+<span class="sourceLineNo">339</span>   private final Map&lt;String,String&gt; resourceStrings = new ConcurrentHashMap&lt;String,String&gt;();<a name="line.339"></a>
+<span class="sourceLineNo">340</span>   private final ConcurrentHashMap&lt;Integer,AtomicInteger&gt; stackTraceHashes = new ConcurrentHashMap&lt;Integer,AtomicInteger&gt;();<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span><a name="line.342"></a>
+<span class="sourceLineNo">343</span>   /**<a name="line.343"></a>
+<span class="sourceLineNo">344</span>    * Constructor.<a name="line.344"></a>
+<span class="sourceLineNo">345</span>    *<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    * @param resource The resource class (a class annotated with {@link RestResource @RestResource}).<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    * @param config The servlet configuration object.<a name="line.347"></a>
+<span class="sourceLineNo">348</span>    * @throws Exception If any initialization problems were encountered.<a name="line.348"></a>
+<span class="sourceLineNo">349</span>    */<a name="line.349"></a>
+<span class="sourceLineNo">350</span>   @SuppressWarnings("unchecked")<a name="line.350"></a>
+<span class="sourceLineNo">351</span>   public RestContext(Object resource, RestConfig config) throws Exception {<a name="line.351"></a>
+<span class="sourceLineNo">352</span>      super(null);<a name="line.352"></a>
+<span class="sourceLineNo">353</span>      RestException _initException = null;<a name="line.353"></a>
+<span class="sourceLineNo">354</span>      try {<a name="line.354"></a>
+<span class="sourceLineNo">355</span>         this.resource = resource;<a name="line.355"></a>
+<span class="sourceLineNo">356</span>         this.config = config;<a name="line.356"></a>
+<span class="sourceLineNo">357</span>         this.parentContext = config.parentContext;<a name="line.357"></a>
+<span class="sourceLineNo">358</span><a name="line.358"></a>
+<span class="sourceLineNo">359</span>         Builder b = new Builder(resource, config);<a name="line.359"></a>
+<span class="sourceLineNo">360</span>         this.allowHeaderParams = b.allowHeaderParams;<a name="line.360"></a>
+<span class="sourceLineNo">361</span>         this.allowBodyParam = b.allowBodyParam;<a name="line.361"></a>
+<span class="sourceLineNo">362</span>         this.renderResponseStackTraces = b.renderResponseStackTraces;<a name="line.362"></a>
+<span class="sourceLineNo">363</span>         this.useStackTraceHashes = b.useStackTraceHashes;<a name="line.363"></a>
+<span class="sourceLineNo">364</span>         this.allowMethodParams = Collections.unmodifiableSet(b.allowMethodParams);<a name="line.364"></a>
+<span class="sourceLineNo">365</span>         this.defaultCharset = b.defaultCharset;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>         this.paramFormat = b.paramFormat;<a name="line.366"></a>
+<span class="sourceLineNo">367</span>         this.varResolver = b.varResolver;<a name="line.367"></a>
+<span class="sourceLineNo">368</span>         this.configFile = b.configFile;<a name="line.368"></a>
+<span class="sourceLineNo">369</span>         this.properties = b.properties;<a name="line.369"></a>
+<span class="sourceLineNo">370</span>         this.beanFilters = b.beanFilters;<a name="line.370"></a>
+<span class="sourceLineNo">371</span>         this.pojoSwaps = b.pojoSwaps;<a name="line.371"></a>
+<span class="sourceLineNo">372</span>         this.paramResolvers = Collections.unmodifiableMap(b.paramResolvers);<a name="line.372"></a>
+<span class="sourceLineNo">373</span>         this.serializers = b.serializers;<a name="line.373"></a>
+<span class="sourceLineNo">374</span>         this.parsers = b.parsers;<a name="line.374"></a>
+<span class="sourceLineNo">375</span>         this.urlEncodingSerializer = b.urlEncodingSerializer;<a name="line.375"></a>
+<span class="sourceLineNo">376</span>         this.urlEncodingParser = b.urlEncodingParser;<a name="line.376"></a>
+<span class="sourceLineNo">377</span>         this.encoders = b.encoders;<a name="line.377"></a>
+<span class="sourceLineNo">378</span>         this.supportedContentTypes = ArrayUtils.toObjectArray(b.supportedContentTypes, MediaType.class);<a name="line.378"></a>
+<span class="sourceLineNo">379</span>         this.supportedAcceptTypes = ArrayUtils.toObjectArray(b.supportedAcceptTypes, MediaType.class);<a name="line.379"></a>
+<span class="sourceLineNo">380</span>         this.clientVersionHeader = b.clientVersionHeader;<a name="line.380"></a>
+<span class="sourceLineNo">381</span>         this.defaultRequestHeaders = Collections.unmodifiableMap(b.defaultRequestHeaders);<a name="line.381"></a>
+<span class="sourceLineNo">382</span>         this.defaultResponseHeaders = Collections.unmodifiableMap(b.defaultResponseHeaders);<a name="line.382"></a>
+<span class="sourceLineNo">383</span>         this.beanContext = b.beanContext;<a name="line.383"></a>
+<span class="sourceLineNo">384</span>         this.converters = b.converters.toArray(new RestConverter[b.converters.size()]);<a name="line.384"></a>
+<span class="sourceLineNo">385</span>         this.guards = b.guards.toArray(new RestGuard[b.guards.size()]);<a name="line.385"></a>
+<span class="sourceLineNo">386</span>         this.responseHandlers = ArrayUtils.toObjectArray(b.responseHandlers, ResponseHandler.class);<a name="line.386"></a>
+<span class="sourceLineNo">387</span>         this.mimetypesFileTypeMap = b.mimetypesFileTypeMap;<a name="line.387"></a>
+<span class="sourceLineNo">388</span>         this.styleSheet = b.styleSheet;<a name="line.388"></a>
+<span class="sourceLineNo">389</span>         this.favIcon = b.favIcon;<a name="line.389"></a>
+<span class="sourceLineNo">390</span>         this.staticFilesMap = Collections.unmodifiableMap(b.staticFilesMap);<a name="line.390"></a>
+<span class="sourceLineNo">391</span>         this.staticFilesPrefixes = b.staticFilesPrefixes;<a name="line.391"></a>
+<span class="sourceLineNo">392</span>         this.msgs = b.messageBundle;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>         this.childResources = Collections.synchronizedMap(new LinkedHashMap&lt;String,RestContext&gt;());  // Not unmodifiable on purpose so that children can be replaced.<a name="line.393"></a>
+<span class="sourceLineNo">394</span>         this.logger = b.logger;<a name="line.394"></a>
+<span class="sourceLineNo">395</span>         this.fullPath = b.fullPath;<a name="line.395"></a>
+<span class="sourceLineNo">396</span>         this.pageTitle = b.pageTitle;<a name="line.396"></a>
+<span class="sourceLineNo">397</span>         this.pageText = b.pageText;<a name="line.397"></a>
+<span class="sourceLineNo">398</span>         this.pageLinks = b.pageLinks;<a name="line.398"></a>
+<span class="sourceLineNo">399</span><a name="line.399"></a>
+<span class="sourceLineNo">400</span>         //----------------------------------------------------------------------------------------------------<a name="line.400"></a>
+<span class="sourceLineNo">401</span>         // Initialize the child resources.<a name="line.401"></a>
+<span class="sourceLineNo">402</span>         // Done after initializing fields above since we pass this object to the child resources.<a name="line.402"></a>
+<span class="sourceLineNo">403</span>         //----------------------------------------------------------------------------------------------------<a name="line.403"></a>
+<span class="sourceLineNo">404</span>         List&lt;String&gt; methodsFound = new LinkedList&lt;String&gt;();   // Temporary to help debug transient duplicate method issue.<a name="line.404"></a>
+<span class="sourceLineNo">405</span>         Map&lt;String,CallRouter.Builder&gt; routers = new LinkedHashMap&lt;String,CallRouter.Builder&gt;();<a name="line.405"></a>
+<span class="sourceLineNo">406</span>         Map&lt;String,CallMethod&gt; _javaRestMethods = new LinkedHashMap&lt;String,CallMethod&gt;();<a name="line.406"></a>
+<span class="sourceLineNo">407</span>         for (java.lang.reflect.Method method : resource.getClass().getMethods()) {<a name="line.407"></a>
+<span class="sourceLineNo">408</span>            if (method.isAnnotationPresent(RestMethod.class)) {<a name="line.408"></a>
+<span class="sourceLineNo">409</span>               RestMethod a = method.getAnnotation(RestMethod.class);<a name="line.409"></a>
+<span class="sourceLineNo">410</span>               methodsFound.add(method.getName() + "," + a.name() + "," + a.path());<a name="line.410"></a>
+<span class="sourceLineNo">411</span>               try {<a name="line.411"></a>
+<span class="sourceLineNo">412</span>                  if (! Modifier.isPublic(method.getModifiers()))<a name="line.412"></a>
+<span class="sourceLineNo">413</span>                     throw new RestServletException("@RestMethod method {0}.{1} must be defined as public.", this.getClass().getName(), method.getName());<a name="line.413"></a>
+<span class="sourceLineNo">414</span><a name="line.414"></a>
+<span class="sourceLineNo">415</span>                  CallMethod sm = new CallMethod(resource, method, this);<a name="line.415"></a>
+<span class="sourceLineNo">416</span>                  String httpMethod = sm.getHttpMethod();<a name="line.416"></a>
+<span class="sourceLineNo">417</span><a name="line.417"></a>
+<span class="sourceLineNo">418</span>                  // PROXY is a special case where a method returns an interface that we<a name="line.418"></a>
+<span class="sourceLineNo">419</span>                  // can perform REST calls against.<a name="line.419"></a>
+<span class="sourceLineNo">420</span>                  // We override the CallMethod.invoke() method to insert our logic.<a name="line.420"></a>
+<span class="sourceLineNo">421</span>                  if ("PROXY".equals(httpMethod)) {<a name="line.421"></a>
+<span class="sourceLineNo">422</span><a name="line.422"></a>
+<span class="sourceLineNo">423</span>                     final ClassMeta&lt;?&gt; interfaceClass = beanContext.getClassMeta(method.getGenericReturnType());<a name="line.423"></a>
+<span class="sourceLineNo">424</span>                     final Map&lt;String,Method&gt; remoteableMethods = interfaceClass.getRemoteableMethods();<a name="line.424"></a>
+<span class="sourceLineNo">425</span>                     if (remoteableMethods.isEmpty())<a name="line.425"></a>
+<span class="sourceLineNo">426</span>                        throw new RestException(SC_INTERNAL_SERVER_ERROR, "Method {0} returns an interface {1} that doesn't define any remoteable methods.", ClassUtils.getMethodSignature(method), interfaceClass.getReadableName());<a name="line.426"></a>
+<span class="sourceLineNo">427</span><a name="line.427"></a>
+<span class="sourceLineNo">428</span>                     sm = new CallMethod(resource, method, this) {<a name="line.428"></a>
+<span class="sourceLineNo">429</span><a name="line.429"></a>
+<span class="sourceLineNo">430</span>                        @Override<a name="line.430"></a>
+<span class="sourceLineNo">431</span>                        int invoke(String pathInfo, RestRequest req, RestResponse res) throws RestException {<a name="line.431"></a>
 <span class="sourceLineNo">432</span><a name="line.432"></a>
-<span class="sourceLineNo">433</span>                           final Object o = res.getOutput();<a name="line.433"></a>
-<span class="sourceLineNo">434</span><a name="line.434"></a>
-<span class="sourceLineNo">435</span>                           if ("GET".equals(req.getMethod())) {<a name="line.435"></a>
-<span class="sourceLineNo">436</span>                              res.setOutput(ClassUtils.getMethodInfo(remoteableMethods.values()));<a name="line.436"></a>
-<span class="sourceLineNo">437</span>                              return SC_OK;<

<TRUNCATED>


Mime
View raw message