blob: 4d16d8f63d3f4776e22e19a08f05f016f700ade9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>HttpServletRequest</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HttpServletRequest";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":18,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":18,"i25":6,"i26":6,"i27":38,"i28":6,"i29":6,"i30":18,"i31":6,"i32":6,"i33":6,"i34":18,"i35":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../javax/servlet/http/HttpServletMapping.html" title="interface in javax.servlet.http"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javax/servlet/http/HttpServletRequest.html" target="_top">Frames</a></li>
<li><a href="HttpServletRequest.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javax.servlet.http</div>
<h2 title="Interface HttpServletRequest" class="title">Interface HttpServletRequest</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet">ServletRequest</a></dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../org/apache/openejb/server/httpd/HttpRequest.html" title="interface in org.apache.openejb.server.httpd">HttpRequest</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../org/apache/openejb/server/httpd/EEFilter.CdiRequest.html" title="class in org.apache.openejb.server.httpd">EEFilter.CdiRequest</a>, <a href="../../../org/apache/openejb/server/httpd/EEFilter.NoCdiRequest.html" title="class in org.apache.openejb.server.httpd">EEFilter.NoCdiRequest</a>, <a href="../../../org/apache/openejb/server/httpd/HttpRequestImpl.html" title="class in org.apache.openejb.server.httpd">HttpRequestImpl</a>, <a href="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http">HttpServletRequestWrapper</a>, <a href="../../../org/apache/tomee/microprofile/jwt/MPJWTFilter.MPJWTServletRequestWrapper.html" title="class in org.apache.tomee.microprofile.jwt">MPJWTFilter.MPJWTServletRequestWrapper</a>, <a href="../../../org/apache/tomee/security/http/SavedHttpServletRequest.html" title="class in org.apache.tomee.security.http">SavedHttpServletRequest</a>, <a href="../../../org/apache/openejb/server/httpd/ServletRequestAdapter.html" title="class in org.apache.openejb.server.httpd">ServletRequestAdapter</a>, <a href="../../../org/apache/openejb/rest/ThreadLocalHttpServletRequest.html" title="class in org.apache.openejb.rest">ThreadLocalHttpServletRequest</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">HttpServletRequest</span>
extends <a href="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet">ServletRequest</a></pre>
<div class="block">Extends the <a href="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet"><code>ServletRequest</code></a> interface to provide
request information for HTTP servlets.
<p>The servlet container creates an <code>HttpServletRequest</code>
object and passes it as an argument to the servlet's service
methods (<code>doGet</code>, <code>doPost</code>, etc).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#BASIC_AUTH">BASIC_AUTH</a></span></code>
<div class="block">String identifier for Basic authentication.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#CLIENT_CERT_AUTH">CLIENT_CERT_AUTH</a></span></code>
<div class="block">String identifier for Client Certificate authentication.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#DIGEST_AUTH">DIGEST_AUTH</a></span></code>
<div class="block">String identifier for Digest authentication.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#FORM_AUTH">FORM_AUTH</a></span></code>
<div class="block">String identifier for Form authentication.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#authenticate-javax.servlet.http.HttpServletResponse-">authenticate</a></span>(<a href="../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a>&nbsp;response)</code>
<div class="block">Use the container login mechanism configured for the
<code>ServletContext</code> to authenticate the user making
this request.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#changeSessionId--">changeSessionId</a></span>()</code>
<div class="block">Change the session id of the current session associated with this
request and return the new session id.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getAuthType--">getAuthType</a></span>()</code>
<div class="block">Returns the name of the authentication scheme used to protect
the servlet.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getContextPath--">getContextPath</a></span>()</code>
<div class="block">Returns the portion of the request URI that indicates the context
of the request.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../javax/servlet/http/Cookie.html" title="class in javax.servlet.http">Cookie</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getCookies--">getCookies</a></span>()</code>
<div class="block">Returns an array containing all of the <code>Cookie</code>
objects the client sent with this request.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getDateHeader-java.lang.String-">getDateHeader</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the specified request header
as a <code>long</code> value that represents a
<code>Date</code> object.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getHeader-java.lang.String-">getHeader</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the specified request header
as a <code>String</code>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.util.Enumeration&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getHeaderNames--">getHeaderNames</a></span>()</code>
<div class="block">Returns an enumeration of all the header names
this request contains.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.util.Enumeration&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getHeaders-java.lang.String-">getHeaders</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns all the values of the specified request header
as an <code>Enumeration</code> of <code>String</code> objects.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>default <a href="../../../javax/servlet/http/HttpServletMapping.html" title="interface in javax.servlet.http">HttpServletMapping</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getHttpServletMapping--">getHttpServletMapping</a></span>()</code>
<div class="block">Return the <a href="../../../javax/servlet/http/HttpServletMapping.html" title="interface in javax.servlet.http"><code>HttpServletMapping</code></a> by which the <a href="../../../javax/servlet/http/HttpServlet.html" title="class in javax.servlet.http"><code>HttpServlet</code></a> for this <code>HttpServletRequest</code> was invoked.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getIntHeader-java.lang.String-">getIntHeader</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the value of the specified request header
as an <code>int</code>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getMethod--">getMethod</a></span>()</code>
<div class="block">Returns the name of the HTTP method with which this
request was made, for example, GET, POST, or PUT.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http">Part</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getPart-java.lang.String-">getPart</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Gets the <a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http"><code>Part</code></a> with the given name.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http">Part</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getParts--">getParts</a></span>()</code>
<div class="block">Gets all the <a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http"><code>Part</code></a> components of this request, provided
that it is of type <code>multipart/form-data</code>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getPathInfo--">getPathInfo</a></span>()</code>
<div class="block">Returns any extra path information associated with
the URL the client sent when it made this request.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getPathTranslated--">getPathTranslated</a></span>()</code>
<div class="block">Returns any extra path information after the servlet name
but before the query string, and translates it to a real
path.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getQueryString--">getQueryString</a></span>()</code>
<div class="block">Returns the query string that is contained in the request
URL after the path.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getRemoteUser--">getRemoteUser</a></span>()</code>
<div class="block">Returns the login of the user making this request, if the
user has been authenticated, or <code>null</code> if the user
has not been authenticated.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getRequestedSessionId--">getRequestedSessionId</a></span>()</code>
<div class="block">Returns the session ID specified by the client.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getRequestURI--">getRequestURI</a></span>()</code>
<div class="block">Returns the part of this request's URL from the protocol
name up to the query string in the first line of the HTTP request.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>java.lang.StringBuffer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getRequestURL--">getRequestURL</a></span>()</code>
<div class="block">Reconstructs the URL the client used to make the request.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getServletPath--">getServletPath</a></span>()</code>
<div class="block">Returns the part of this request's URL that calls
the servlet.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../javax/servlet/http/HttpSession.html" title="interface in javax.servlet.http">HttpSession</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getSession--">getSession</a></span>()</code>
<div class="block">Returns the current session associated with this request,
or if the request does not have a session, creates one.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../javax/servlet/http/HttpSession.html" title="interface in javax.servlet.http">HttpSession</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getSession-boolean-">getSession</a></span>(boolean&nbsp;create)</code>
<div class="block">Returns the current <code>HttpSession</code>
associated with this request or, if there is no
current session and <code>create</code> is true, returns
a new session.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>default java.util.Map&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getTrailerFields--">getTrailerFields</a></span>()</code>
<div class="block">Get the request trailer fields.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>java.security.Principal</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#getUserPrincipal--">getUserPrincipal</a></span>()</code>
<div class="block">Returns a <code>java.security.Principal</code> object containing
the name of the current authenticated user.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromCookie--">isRequestedSessionIdFromCookie</a></span>()</code>
<div class="block">Checks whether the requested session ID was conveyed to the
server as an HTTP cookie.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromUrl--">isRequestedSessionIdFromUrl</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">As of Version 2.1 of the Java Servlet
API, use <a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromURL--"><code>isRequestedSessionIdFromURL()</code></a>
instead.</span></div>
</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromURL--">isRequestedSessionIdFromURL</a></span>()</code>
<div class="block">Checks whether the requested session ID was conveyed to the
server as part of the request URL.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdValid--">isRequestedSessionIdValid</a></span>()</code>
<div class="block">Checks whether the requested session ID is still valid.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>default boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#isTrailerFieldsReady--">isTrailerFieldsReady</a></span>()</code>
<div class="block">Return a boolean indicating whether trailer fields are ready to read
using <a href="../../../javax/servlet/http/HttpServletRequest.html#getTrailerFields--"><code>getTrailerFields()</code></a>.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#isUserInRole-java.lang.String-">isUserInRole</a></span>(java.lang.String&nbsp;role)</code>
<div class="block">Returns a boolean indicating whether the authenticated user is included
in the specified logical "role".</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#login-java.lang.String-java.lang.String-">login</a></span>(java.lang.String&nbsp;username,
java.lang.String&nbsp;password)</code>
<div class="block">Validate the provided username and password in the password validation
realm used by the web container login mechanism configured for the
<code>ServletContext</code>.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#logout--">logout</a></span>()</code>
<div class="block">Establish <code>null</code> as the value returned when
<code>getUserPrincipal</code>, <code>getRemoteUser</code>,
and <code>getAuthType</code> is called on the request.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>default <a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http">PushBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#newPushBuilder--">newPushBuilder</a></span>()</code>
<div class="block">Instantiates a new instance of <a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http"><code>PushBuilder</code></a> for issuing server
push responses from the current request.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../javax/servlet/http/HttpUpgradeHandler.html" title="interface in javax.servlet.http">HttpUpgradeHandler</a>&gt;<br>T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/HttpServletRequest.html#upgrade-java.lang.Class-">upgrade</a></span>(java.lang.Class&lt;T&gt;&nbsp;handlerClass)</code>
<div class="block">Creates an instance of <code>HttpUpgradeHandler</code> for a given
class and uses it for the http protocol upgrade processing.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.servlet.ServletRequest">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;javax.servlet.<a href="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet">ServletRequest</a></h3>
<code><a href="../../../javax/servlet/ServletRequest.html#getAsyncContext--">getAsyncContext</a>, <a href="../../../javax/servlet/ServletRequest.html#getAttribute-java.lang.String-">getAttribute</a>, <a href="../../../javax/servlet/ServletRequest.html#getAttributeNames--">getAttributeNames</a>, <a href="../../../javax/servlet/ServletRequest.html#getCharacterEncoding--">getCharacterEncoding</a>, <a href="../../../javax/servlet/ServletRequest.html#getContentLength--">getContentLength</a>, <a href="../../../javax/servlet/ServletRequest.html#getContentLengthLong--">getContentLengthLong</a>, <a href="../../../javax/servlet/ServletRequest.html#getContentType--">getContentType</a>, <a href="../../../javax/servlet/ServletRequest.html#getDispatcherType--">getDispatcherType</a>, <a href="../../../javax/servlet/ServletRequest.html#getInputStream--">getInputStream</a>, <a href="../../../javax/servlet/ServletRequest.html#getLocalAddr--">getLocalAddr</a>, <a href="../../../javax/servlet/ServletRequest.html#getLocale--">getLocale</a>, <a href="../../../javax/servlet/ServletRequest.html#getLocales--">getLocales</a>, <a href="../../../javax/servlet/ServletRequest.html#getLocalName--">getLocalName</a>, <a href="../../../javax/servlet/ServletRequest.html#getLocalPort--">getLocalPort</a>, <a href="../../../javax/servlet/ServletRequest.html#getParameter-java.lang.String-">getParameter</a>, <a href="../../../javax/servlet/ServletRequest.html#getParameterMap--">getParameterMap</a>, <a href="../../../javax/servlet/ServletRequest.html#getParameterNames--">getParameterNames</a>, <a href="../../../javax/servlet/ServletRequest.html#getParameterValues-java.lang.String-">getParameterValues</a>, <a href="../../../javax/servlet/ServletRequest.html#getProtocol--">getProtocol</a>, <a href="../../../javax/servlet/ServletRequest.html#getReader--">getReader</a>, <a href="../../../javax/servlet/ServletRequest.html#getRealPath-java.lang.String-">getRealPath</a>, <a href="../../../javax/servlet/ServletRequest.html#getRemoteAddr--">getRemoteAddr</a>, <a href="../../../javax/servlet/ServletRequest.html#getRemoteHost--">getRemoteHost</a>, <a href="../../../javax/servlet/ServletRequest.html#getRemotePort--">getRemotePort</a>, <a href="../../../javax/servlet/ServletRequest.html#getRequestDispatcher-java.lang.String-">getRequestDispatcher</a>, <a href="../../../javax/servlet/ServletRequest.html#getScheme--">getScheme</a>, <a href="../../../javax/servlet/ServletRequest.html#getServerName--">getServerName</a>, <a href="../../../javax/servlet/ServletRequest.html#getServerPort--">getServerPort</a>, <a href="../../../javax/servlet/ServletRequest.html#getServletContext--">getServletContext</a>, <a href="../../../javax/servlet/ServletRequest.html#isAsyncStarted--">isAsyncStarted</a>, <a href="../../../javax/servlet/ServletRequest.html#isAsyncSupported--">isAsyncSupported</a>, <a href="../../../javax/servlet/ServletRequest.html#isSecure--">isSecure</a>, <a href="../../../javax/servlet/ServletRequest.html#removeAttribute-java.lang.String-">removeAttribute</a>, <a href="../../../javax/servlet/ServletRequest.html#setAttribute-java.lang.String-java.lang.Object-">setAttribute</a>, <a href="../../../javax/servlet/ServletRequest.html#setCharacterEncoding-java.lang.String-">setCharacterEncoding</a>, <a href="../../../javax/servlet/ServletRequest.html#startAsync--">startAsync</a>, <a href="../../../javax/servlet/ServletRequest.html#startAsync-javax.servlet.ServletRequest-javax.servlet.ServletResponse-">startAsync</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="BASIC_AUTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BASIC_AUTH</h4>
<pre>static final&nbsp;java.lang.String BASIC_AUTH</pre>
<div class="block">String identifier for Basic authentication. Value "BASIC"</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#javax.servlet.http.HttpServletRequest.BASIC_AUTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FORM_AUTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORM_AUTH</h4>
<pre>static final&nbsp;java.lang.String FORM_AUTH</pre>
<div class="block">String identifier for Form authentication. Value "FORM"</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#javax.servlet.http.HttpServletRequest.FORM_AUTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CLIENT_CERT_AUTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CLIENT_CERT_AUTH</h4>
<pre>static final&nbsp;java.lang.String CLIENT_CERT_AUTH</pre>
<div class="block">String identifier for Client Certificate authentication. Value "CLIENT_CERT"</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#javax.servlet.http.HttpServletRequest.CLIENT_CERT_AUTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DIGEST_AUTH">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DIGEST_AUTH</h4>
<pre>static final&nbsp;java.lang.String DIGEST_AUTH</pre>
<div class="block">String identifier for Digest authentication. Value "DIGEST"</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#javax.servlet.http.HttpServletRequest.DIGEST_AUTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getAuthType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthType</h4>
<pre>java.lang.String&nbsp;getAuthType()</pre>
<div class="block">Returns the name of the authentication scheme used to protect
the servlet. All servlet containers support basic, form and client
certificate authentication, and may additionally support digest
authentication.
If the servlet is not authenticated <code>null</code> is returned.
<p>Same as the value of the CGI variable AUTH_TYPE.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>one of the static members BASIC_AUTH,
FORM_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH
(suitable for == comparison) or
the container-specific string indicating
the authentication scheme, or
<code>null</code> if the request was
not authenticated.</dd>
</dl>
</li>
</ul>
<a name="getCookies--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCookies</h4>
<pre><a href="../../../javax/servlet/http/Cookie.html" title="class in javax.servlet.http">Cookie</a>[]&nbsp;getCookies()</pre>
<div class="block">Returns an array containing all of the <code>Cookie</code>
objects the client sent with this request.
This method returns <code>null</code> if no cookies were sent.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of all the <code>Cookies</code>
included with this request, or <code>null</code>
if the request has no cookies</dd>
</dl>
</li>
</ul>
<a name="getDateHeader-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateHeader</h4>
<pre>long&nbsp;getDateHeader(java.lang.String&nbsp;name)</pre>
<div class="block">Returns the value of the specified request header
as a <code>long</code> value that represents a
<code>Date</code> object. Use this method with
headers that contain dates, such as
<code>If-Modified-Since</code>.
<p>The date is returned as
the number of milliseconds since January 1, 1970 GMT.
The header name is case insensitive.
<p>If the request did not have a header of the
specified name, this method returns -1. If the header
can't be converted to a date, the method throws
an <code>IllegalArgumentException</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the
name of the header</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>long</code> value
representing the date specified
in the header expressed as
the number of milliseconds
since January 1, 1970 GMT,
or -1 if the named header
was not included with the
request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - If the header value
can't be converted
to a date</dd>
</dl>
</li>
</ul>
<a name="getHeader-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeader</h4>
<pre>java.lang.String&nbsp;getHeader(java.lang.String&nbsp;name)</pre>
<div class="block">Returns the value of the specified request header
as a <code>String</code>. If the request did not include a header
of the specified name, this method returns <code>null</code>.
If there are multiple headers with the same name, this method
returns the first head in the request.
The header name is case insensitive. You can use
this method with any request header.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the
header name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing the
value of the requested
header, or <code>null</code>
if the request does not
have a header of that name</dd>
</dl>
</li>
</ul>
<a name="getHeaders-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaders</h4>
<pre>java.util.Enumeration&lt;java.lang.String&gt;&nbsp;getHeaders(java.lang.String&nbsp;name)</pre>
<div class="block">Returns all the values of the specified request header
as an <code>Enumeration</code> of <code>String</code> objects.
<p>Some headers, such as <code>Accept-Language</code> can be sent
by clients as several headers each with a different value rather than
sending the header as a comma separated list.
<p>If the request did not include any headers
of the specified name, this method returns an empty
<code>Enumeration</code>.
The header name is case insensitive. You can use
this method with any request header.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the
header name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>Enumeration</code> containing
the values of the requested header. If
the request does not have any headers of
that name return an empty
enumeration. If
the container does not allow access to
header information, return null</dd>
</dl>
</li>
</ul>
<a name="getHeaderNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaderNames</h4>
<pre>java.util.Enumeration&lt;java.lang.String&gt;&nbsp;getHeaderNames()</pre>
<div class="block">Returns an enumeration of all the header names
this request contains. If the request has no
headers, this method returns an empty enumeration.
<p>Some servlet containers do not allow
servlets to access headers using this method, in
which case this method returns <code>null</code></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an enumeration of all the
header names sent with this
request; if the request has
no headers, an empty enumeration;
if the servlet container does not
allow servlets to use this method,
<code>null</code></dd>
</dl>
</li>
</ul>
<a name="getIntHeader-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIntHeader</h4>
<pre>int&nbsp;getIntHeader(java.lang.String&nbsp;name)</pre>
<div class="block">Returns the value of the specified request header
as an <code>int</code>. If the request does not have a header
of the specified name, this method returns -1. If the
header cannot be converted to an integer, this method
throws a <code>NumberFormatException</code>.
<p>The header name is case insensitive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the name
of a request header</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an integer expressing the value
of the request header or -1
if the request doesn't have a
header of this name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NumberFormatException</code> - If the header value
can't be converted
to an <code>int</code></dd>
</dl>
</li>
</ul>
<a name="getHttpServletMapping--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHttpServletMapping</h4>
<pre>default&nbsp;<a href="../../../javax/servlet/http/HttpServletMapping.html" title="interface in javax.servlet.http">HttpServletMapping</a>&nbsp;getHttpServletMapping()</pre>
<div class="block"><p>Return the <a href="../../../javax/servlet/http/HttpServletMapping.html" title="interface in javax.servlet.http"><code>HttpServletMapping</code></a> by which the <a href="../../../javax/servlet/http/HttpServlet.html" title="class in javax.servlet.http"><code>HttpServlet</code></a> for this <code>HttpServletRequest</code> was invoked.
The mappings for any applicable <a href="../../../javax/servlet/Filter.html" title="interface in javax.servlet"><code>Filter</code></a>s are
not indicated in the result. If the currently active <a href="../../../javax/servlet/Servlet.html" title="interface in javax.servlet"><code>Servlet</code></a> invocation was obtained by a call to
<a href="../../../javax/servlet/ServletRequest.html#getRequestDispatcher-java.lang.String-"><code>ServletRequest.getRequestDispatcher(java.lang.String)</code></a> followed by a call to
<a href="../../../javax/servlet/RequestDispatcher.html#forward-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a>, the returned <code>HttpServletMapping</code> is the one corresponding to the path used to
obtain the <a href="../../../javax/servlet/RequestDispatcher.html" title="interface in javax.servlet"><code>RequestDispatcher</code></a>. If the currently active
<code>Servlet</code> invocation was obtained by a call to <a href="../../../javax/servlet/ServletRequest.html#getRequestDispatcher-java.lang.String-"><code>ServletRequest.getRequestDispatcher(java.lang.String)</code></a> followed by a call to <a href="../../../javax/servlet/RequestDispatcher.html#include-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a>, the returned <code>HttpServletMapping</code> is the one corresponding to the path that
caused the first <code>Servlet</code> in the invocation sequence to be
invoked. If the currently active <code>Servlet</code> invocation was
obtained by a call to <a href="../../../javax/servlet/AsyncContext.html#dispatch--"><code>AsyncContext.dispatch()</code></a>, the returned <code>HttpServletMapping</code> is the one corresponding to the path that
caused the first <code>Servlet</code> in the invocation sequence to be
invoked. See <a href="../../../javax/servlet/RequestDispatcher.html#FORWARD_MAPPING"><code>RequestDispatcher.FORWARD_MAPPING</code></a>, <a href="../../../javax/servlet/RequestDispatcher.html#INCLUDE_MAPPING"><code>RequestDispatcher.INCLUDE_MAPPING</code></a> and <a href="../../../javax/servlet/AsyncContext.html#ASYNC_MAPPING"><code>AsyncContext.ASYNC_MAPPING</code></a> for additional request
attributes related to <code>HttpServletMapping</code>. If the
currently active <code>Servlet</code> invocation was obtained by a
call to <a href="../../../javax/servlet/ServletContext.html#getNamedDispatcher-java.lang.String-"><code>ServletContext.getNamedDispatcher(java.lang.String)</code></a>,
the returned <code>HttpServletMapping</code> is the one corresponding
to the path for the mapping last applied to this request.</p>
<p>The returned object is immutable. Servlet 4.0 compliant
implementations must override this method.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An instance of <code>HttpServletMapping</code> describing the manner in which
the current request was invoked.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>4.0</dd>
</dl>
</li>
</ul>
<a name="getMethod--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMethod</h4>
<pre>java.lang.String&nbsp;getMethod()</pre>
<div class="block">Returns the name of the HTTP method with which this
request was made, for example, GET, POST, or PUT.
Same as the value of the CGI variable REQUEST_METHOD.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code>
specifying the name
of the method with which
this request was made</dd>
</dl>
</li>
</ul>
<a name="getPathInfo--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathInfo</h4>
<pre>java.lang.String&nbsp;getPathInfo()</pre>
<div class="block">Returns any extra path information associated with
the URL the client sent when it made this request.
The extra path information follows the servlet path
but precedes the query string and will start with
a "/" character.
<p>This method returns <code>null</code> if there
was no extra path information.
<p>Same as the value of the CGI variable PATH_INFO.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code>, decoded by the
web container, specifying
extra path information that comes
after the servlet path but before
the query string in the request URL;
or <code>null</code> if the URL does not have
any extra path information</dd>
</dl>
</li>
</ul>
<a name="getPathTranslated--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathTranslated</h4>
<pre>java.lang.String&nbsp;getPathTranslated()</pre>
<div class="block">Returns any extra path information after the servlet name
but before the query string, and translates it to a real
path. Same as the value of the CGI variable PATH_TRANSLATED.
<p>If the URL does not have any extra path information,
this method returns <code>null</code> or the servlet container
cannot translate the virtual path to a real path for any reason
(such as when the web application is executed from an archive).
The web container does not decode this string.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> specifying the
real path, or <code>null</code> if
the URL does not have any extra path
information</dd>
</dl>
</li>
</ul>
<a name="newPushBuilder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newPushBuilder</h4>
<pre>default&nbsp;<a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http">PushBuilder</a>&nbsp;newPushBuilder()</pre>
<div class="block">Instantiates a new instance of <a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http"><code>PushBuilder</code></a> for issuing server
push responses from the current request. This method returns null
if the current connection does not support server push, or server
push has been disabled by the client via a
<code>SETTINGS_ENABLE_PUSH</code> settings frame value of <code>0</code> (zero).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http"><code>PushBuilder</code></a> for issuing server push responses
from the current request, or null if push is not supported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 4.0</dd>
</dl>
</li>
</ul>
<a name="getContextPath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContextPath</h4>
<pre>java.lang.String&nbsp;getContextPath()</pre>
<div class="block">Returns the portion of the request URI that indicates the context
of the request. The context path always comes first in a request
URI. The path starts with a "/" character but does not end with a "/"
character. For servlets in the default (root) context, this method
returns "". The container does not decode this string.
<p>It is possible that a servlet container may match a context by
more than one context path. In such cases this method will return the
actual context path used by the request and it may differ from the
path returned by the
<a href="../../../javax/servlet/ServletContext.html#getContextPath--"><code>ServletContext.getContextPath()</code></a> method.
The context path returned by
<a href="../../../javax/servlet/ServletContext.html#getContextPath--"><code>ServletContext.getContextPath()</code></a>
should be considered as the prime or preferred context path of the
application.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> specifying the
portion of the request URI that indicates the context
of the request</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/ServletContext.html#getContextPath--"><code>ServletContext.getContextPath()</code></a></dd>
</dl>
</li>
</ul>
<a name="getQueryString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getQueryString</h4>
<pre>java.lang.String&nbsp;getQueryString()</pre>
<div class="block">Returns the query string that is contained in the request
URL after the path. This method returns <code>null</code>
if the URL does not have a query string. Same as the value
of the CGI variable QUERY_STRING.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing the query
string or <code>null</code> if the URL
contains no query string. The value is not
decoded by the container.</dd>
</dl>
</li>
</ul>
<a name="getRemoteUser--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteUser</h4>
<pre>java.lang.String&nbsp;getRemoteUser()</pre>
<div class="block">Returns the login of the user making this request, if the
user has been authenticated, or <code>null</code> if the user
has not been authenticated.
Whether the user name is sent with each subsequent request
depends on the browser and type of authentication. Same as the
value of the CGI variable REMOTE_USER.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> specifying the login
of the user making this request, or <code>null</code>
if the user login is not known</dd>
</dl>
</li>
</ul>
<a name="isUserInRole-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUserInRole</h4>
<pre>boolean&nbsp;isUserInRole(java.lang.String&nbsp;role)</pre>
<div class="block">Returns a boolean indicating whether the authenticated user is included
in the specified logical "role". Roles and role membership can be
defined using deployment descriptors. If the user has not been
authenticated, the method returns <code>false</code>.
<p>The role name "*" should never be used as an argument in calling
<code>isUserInRole</code>. Any call to <code>isUserInRole</code> with
"*" must return false.
If the role-name of the security-role to be tested is "**", and
the application has NOT declared an application security-role with
role-name "**", <code>isUserInRole</code> must only return true if
the user has been authenticated; that is, only when
<a href="../../../javax/servlet/http/HttpServletRequest.html#getRemoteUser--"><code>getRemoteUser()</code></a> and <a href="../../../javax/servlet/http/HttpServletRequest.html#getUserPrincipal--"><code>getUserPrincipal()</code></a> would both return
a non-null value. Otherwise, the container must check
the user for membership in the application role.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>role</code> - a <code>String</code> specifying the name
of the role</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>boolean</code> indicating whether
the user making this request belongs to a given role;
<code>false</code> if the user has not been
authenticated</dd>
</dl>
</li>
</ul>
<a name="getUserPrincipal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserPrincipal</h4>
<pre>java.security.Principal&nbsp;getUserPrincipal()</pre>
<div class="block">Returns a <code>java.security.Principal</code> object containing
the name of the current authenticated user. If the user has not been
authenticated, the method returns <code>null</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>java.security.Principal</code> containing
the name of the user making this request;
<code>null</code> if the user has not been
authenticated</dd>
</dl>
</li>
</ul>
<a name="getRequestedSessionId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestedSessionId</h4>
<pre>java.lang.String&nbsp;getRequestedSessionId()</pre>
<div class="block">Returns the session ID specified by the client. This may
not be the same as the ID of the current valid session
for this request.
If the client did not specify a session ID, this method returns
<code>null</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> specifying the session
ID, or <code>null</code> if the request did
not specify a session ID</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdValid--"><code>isRequestedSessionIdValid()</code></a></dd>
</dl>
</li>
</ul>
<a name="getRequestURI--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestURI</h4>
<pre>java.lang.String&nbsp;getRequestURI()</pre>
<div class="block">Returns the part of this request's URL from the protocol
name up to the query string in the first line of the HTTP request.
The web container does not decode this String.
For example:
<table summary="Examples of Returned Values">
<tr align=left><th>First line of HTTP request </th>
<th> Returned Value</th>
<tr><td>POST /some/path.html HTTP/1.1<td><td>/some/path.html
<tr><td>GET http://foo.bar/a.html HTTP/1.0
<td><td>/a.html
<tr><td>HEAD /xyz?a=b HTTP/1.1<td><td>/xyz
</table>
<p>To reconstruct an URL with a scheme and host, use
<a href="../../../javax/servlet/http/HttpUtils.html#getRequestURL-javax.servlet.http.HttpServletRequest-"><code>HttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing
the part of the URL from the
protocol name up to the query string</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpUtils.html#getRequestURL-javax.servlet.http.HttpServletRequest-"><code>HttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest)</code></a></dd>
</dl>
</li>
</ul>
<a name="getRequestURL--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestURL</h4>
<pre>java.lang.StringBuffer&nbsp;getRequestURL()</pre>
<div class="block">Reconstructs the URL the client used to make the request.
The returned URL contains a protocol, server name, port
number, and server path, but it does not include query
string parameters.
<p>If this request has been forwarded using
<a href="../../../javax/servlet/RequestDispatcher.html#forward-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a>, the server path in the
reconstructed URL must reflect the path used to obtain the
RequestDispatcher, and not the server path specified by the client.
<p>Because this method returns a <code>StringBuffer</code>,
not a string, you can modify the URL easily, for example,
to append query parameters.
<p>This method is useful for creating redirect messages
and for reporting errors.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>StringBuffer</code> object containing
the reconstructed URL</dd>
</dl>
</li>
</ul>
<a name="getServletPath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getServletPath</h4>
<pre>java.lang.String&nbsp;getServletPath()</pre>
<div class="block">Returns the part of this request's URL that calls
the servlet. This path starts with a "/" character
and includes either the servlet name or a path to
the servlet, but does not include any extra path
information or a query string. Same as the value of
the CGI variable SCRIPT_NAME.
<p>This method will return an empty string ("") if the
servlet used to process this request was matched using
the "/*" pattern.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing
the name or path of the servlet being
called, as specified in the request URL,
decoded, or an empty string if the servlet
used to process the request is matched
using the "/*" pattern.</dd>
</dl>
</li>
</ul>
<a name="getSession-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSession</h4>
<pre><a href="../../../javax/servlet/http/HttpSession.html" title="interface in javax.servlet.http">HttpSession</a>&nbsp;getSession(boolean&nbsp;create)</pre>
<div class="block">Returns the current <code>HttpSession</code>
associated with this request or, if there is no
current session and <code>create</code> is true, returns
a new session.
<p>If <code>create</code> is <code>false</code>
and the request has no valid <code>HttpSession</code>,
this method returns <code>null</code>.
<p>To make sure the session is properly maintained,
you must call this method before
the response is committed. If the container is using cookies
to maintain session integrity and is asked to create a new session
when the response is committed, an IllegalStateException is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>create</code> - <code>true</code> to create
a new session for this request if necessary;
<code>false</code> to return <code>null</code>
if there's no current session</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>HttpSession</code> associated
with this request or <code>null</code> if
<code>create</code> is <code>false</code>
and the request has no valid session</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#getSession--"><code>getSession()</code></a></dd>
</dl>
</li>
</ul>
<a name="getSession--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSession</h4>
<pre><a href="../../../javax/servlet/http/HttpSession.html" title="interface in javax.servlet.http">HttpSession</a>&nbsp;getSession()</pre>
<div class="block">Returns the current session associated with this request,
or if the request does not have a session, creates one.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>HttpSession</code> associated
with this request</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#getSession-boolean-"><code>getSession(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="changeSessionId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>changeSessionId</h4>
<pre>java.lang.String&nbsp;changeSessionId()</pre>
<div class="block">Change the session id of the current session associated with this
request and return the new session id.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new session id</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if there is no session associated
with the request</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.1</dd>
</dl>
</li>
</ul>
<a name="isRequestedSessionIdValid--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequestedSessionIdValid</h4>
<pre>boolean&nbsp;isRequestedSessionIdValid()</pre>
<div class="block">Checks whether the requested session ID is still valid.
<p>If the client did not specify any session ID, this method returns
<code>false</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this
request has an id for a valid session
in the current session context;
<code>false</code> otherwise</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#getRequestedSessionId--"><code>getRequestedSessionId()</code></a>,
<a href="../../../javax/servlet/http/HttpServletRequest.html#getSession-boolean-"><code>getSession(boolean)</code></a>,
<a href="../../../javax/servlet/http/HttpSessionContext.html" title="interface in javax.servlet.http"><code>HttpSessionContext</code></a></dd>
</dl>
</li>
</ul>
<a name="isRequestedSessionIdFromCookie--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequestedSessionIdFromCookie</h4>
<pre>boolean&nbsp;isRequestedSessionIdFromCookie()</pre>
<div class="block"><p>Checks whether the requested session ID was conveyed to the
server as an HTTP cookie.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the session ID
was conveyed to the server an an HTTP
cookie; otherwise, <code>false</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#getSession-boolean-"><code>getSession(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="isRequestedSessionIdFromURL--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequestedSessionIdFromURL</h4>
<pre>boolean&nbsp;isRequestedSessionIdFromURL()</pre>
<div class="block"><p>Checks whether the requested session ID was conveyed to the
server as part of the request URL.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the session ID was conveyed to the
server as part of a URL; otherwise,
<code>false</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#getSession-boolean-"><code>getSession(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="isRequestedSessionIdFromUrl--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequestedSessionIdFromUrl</h4>
<pre>@Deprecated
boolean&nbsp;isRequestedSessionIdFromUrl()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of Version 2.1 of the Java Servlet
API, use <a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromURL--"><code>isRequestedSessionIdFromURL()</code></a>
instead.</span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the session ID was conveyed to the
server as part of a URL; otherwise,
<code>false</code></dd>
</dl>
</li>
</ul>
<a name="authenticate-javax.servlet.http.HttpServletResponse-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>authenticate</h4>
<pre>boolean&nbsp;authenticate(<a href="../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a>&nbsp;response)
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Use the container login mechanism configured for the
<code>ServletContext</code> to authenticate the user making
this request.
<p>This method may modify and commit the argument
<code>HttpServletResponse</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>response</code> - The <code>HttpServletResponse</code>
associated with this <code>HttpServletRequest</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> when non-null values were or have been
established as the values returned by <code>getUserPrincipal</code>,
<code>getRemoteUser</code>, and <code>getAuthType</code>. Return
<code>false</code> if authentication is incomplete and the underlying
login mechanism has committed, in the response, the message (e.g.,
challenge) and HTTP status code to be returned to the user.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an input or output error occurred while
reading from this request or writing to the given response</dd>
<dd><code>java.lang.IllegalStateException</code> - if the login mechanism attempted to
modify the response and it was already committed</dd>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if the authentication failed and
the caller is responsible for handling the error (i.e., the
underlying login mechanism did NOT establish the message and
HTTP status code to be returned to the user)</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
</dl>
</li>
</ul>
<a name="login-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>login</h4>
<pre>void&nbsp;login(java.lang.String&nbsp;username,
java.lang.String&nbsp;password)
throws <a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Validate the provided username and password in the password validation
realm used by the web container login mechanism configured for the
<code>ServletContext</code>.
<p>This method returns without throwing a <code>ServletException</code>
when the login mechanism configured for the <code>ServletContext</code>
supports username password validation, and when, at the time of the
call to login, the identity of the caller of the request had
not been established (i.e, all of <code>getUserPrincipal</code>,
<code>getRemoteUser</code>, and <code>getAuthType</code> return null),
and when validation of the provided credentials is successful.
Otherwise, this method throws a <code>ServletException</code> as
described below.
<p>When this method returns without throwing an exception, it must
have established non-null values as the values returned by
<code>getUserPrincipal</code>, <code>getRemoteUser</code>, and
<code>getAuthType</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>username</code> - The <code>String</code> value corresponding to
the login identifier of the user.</dd>
<dd><code>password</code> - The password <code>String</code> corresponding
to the identified user.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if the configured login mechanism
does not support username
password authentication, or if a
non-null caller identity had
already been established (prior
to the call to login), or if
validation of the provided
username and password fails.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
</dl>
</li>
</ul>
<a name="logout--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logout</h4>
<pre>void&nbsp;logout()
throws <a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Establish <code>null</code> as the value returned when
<code>getUserPrincipal</code>, <code>getRemoteUser</code>,
and <code>getAuthType</code> is called on the request.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if logout fails</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
</dl>
</li>
</ul>
<a name="getParts--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParts</h4>
<pre>java.util.Collection&lt;<a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http">Part</a>&gt;&nbsp;getParts()
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Gets all the <a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http"><code>Part</code></a> components of this request, provided
that it is of type <code>multipart/form-data</code>.
<p>If this request is of type <code>multipart/form-data</code>, but
does not contain any <code>Part</code> components, the returned
<code>Collection</code> will be empty.
<p>Any changes to the returned <code>Collection</code> must not
affect this <code>HttpServletRequest</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a (possibly empty) <code>Collection</code> of the
<code>Part</code> components of this request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurred during the retrieval
of the <a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http"><code>Part</code></a> components of this request</dd>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if this request is not of type
<code>multipart/form-data</code></dd>
<dd><code>java.lang.IllegalStateException</code> - if the request body is larger than
<code>maxRequestSize</code>, or any <code>Part</code> in the
request is larger than <code>maxFileSize</code>, or there is no
<code>@MultipartConfig</code> or <code>multipart-config</code> in
deployment descriptors</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/annotation/MultipartConfig.html#maxFileSize--"><code>MultipartConfig.maxFileSize()</code></a>,
<a href="../../../javax/servlet/annotation/MultipartConfig.html#maxRequestSize--"><code>MultipartConfig.maxRequestSize()</code></a></dd>
</dl>
</li>
</ul>
<a name="getPart-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPart</h4>
<pre><a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http">Part</a>&nbsp;getPart(java.lang.String&nbsp;name)
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Gets the <a href="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http"><code>Part</code></a> with the given name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the requested <code>Part</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <code>Part</code> with the given name, or
<code>null</code> if this request is of type
<code>multipart/form-data</code>, but does not
contain the requested <code>Part</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurred during the retrieval
of the requested <code>Part</code></dd>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if this request is not of type
<code>multipart/form-data</code></dd>
<dd><code>java.lang.IllegalStateException</code> - if the request body is larger than
<code>maxRequestSize</code>, or any <code>Part</code> in the
request is larger than <code>maxFileSize</code>, or there is no
<code>@MultipartConfig</code> or <code>multipart-config</code> in
deployment descriptors</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/annotation/MultipartConfig.html#maxFileSize--"><code>MultipartConfig.maxFileSize()</code></a>,
<a href="../../../javax/servlet/annotation/MultipartConfig.html#maxRequestSize--"><code>MultipartConfig.maxRequestSize()</code></a></dd>
</dl>
</li>
</ul>
<a name="upgrade-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>upgrade</h4>
<pre>&lt;T extends <a href="../../../javax/servlet/http/HttpUpgradeHandler.html" title="interface in javax.servlet.http">HttpUpgradeHandler</a>&gt;&nbsp;T&nbsp;upgrade(java.lang.Class&lt;T&gt;&nbsp;handlerClass)
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Creates an instance of <code>HttpUpgradeHandler</code> for a given
class and uses it for the http protocol upgrade processing.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The <code>Class</code>, which extends <a href="../../../javax/servlet/http/HttpUpgradeHandler.html" title="interface in javax.servlet.http"><code>HttpUpgradeHandler</code></a>, of the <code>handlerClass</code>.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>handlerClass</code> - The <code>HttpUpgradeHandler</code> class used for the upgrade.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an instance of the <code>HttpUpgradeHandler</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurred during the upgrade</dd>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if the given <code>handlerClass</code> fails to
be instantiated</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpUpgradeHandler.html" title="interface in javax.servlet.http"><code>HttpUpgradeHandler</code></a>,
<a href="../../../javax/servlet/http/WebConnection.html" title="interface in javax.servlet.http"><code>WebConnection</code></a></dd>
</dl>
</li>
</ul>
<a name="getTrailerFields--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTrailerFields</h4>
<pre>default&nbsp;java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;getTrailerFields()</pre>
<div class="block">Get the request trailer fields.
<p>The returned map is not backed by the <code>HttpServletRequest</code> object,
so changes in the returned map are not reflected in the
<code>HttpServletRequest</code> object, and vice-versa.</p>
<p><a href="../../../javax/servlet/http/HttpServletRequest.html#isTrailerFieldsReady--"><code>isTrailerFieldsReady()</code></a> should be called first to determine
if it is safe to call this method without causing an exception.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A map of trailer fields in which all the keys are in lowercase,
regardless of the case they had at the protocol level. If there are no
trailer fields, yet <a href="../../../javax/servlet/http/HttpServletRequest.html#isTrailerFieldsReady--"><code>isTrailerFieldsReady()</code></a> is returning true,
the empty map is returned.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if <a href="../../../javax/servlet/http/HttpServletRequest.html#isTrailerFieldsReady--"><code>isTrailerFieldsReady()</code></a> is false</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 4.0</dd>
</dl>
</li>
</ul>
<a name="isTrailerFieldsReady--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isTrailerFieldsReady</h4>
<pre>default&nbsp;boolean&nbsp;isTrailerFieldsReady()</pre>
<div class="block">Return a boolean indicating whether trailer fields are ready to read
using <a href="../../../javax/servlet/http/HttpServletRequest.html#getTrailerFields--"><code>getTrailerFields()</code></a>.
This methods returns true immediately if it is known that there is no
trailer in the request, for instance, the underlying protocol (such
as HTTP 1.0) does not supports the trailer fields, or the request is
not in chunked encoding in HTTP 1.1.
And the method also returns true if both of the following conditions
are satisfied:
<ol type="a">
<li> the application has read all the request data and an EOF
indication has been returned from the <a href="../../../javax/servlet/ServletRequest.html#getReader--"><code>ServletRequest.getReader()</code></a>
or <a href="../../../javax/servlet/ServletRequest.html#getInputStream--"><code>ServletRequest.getInputStream()</code></a>.
<li> all the trailer fields sent by the client have been received.
Note that it is possible that the client has sent no trailer fields.
</ol></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a boolean whether trailer fields are ready to read</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 4.0</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../javax/servlet/http/HttpServletMapping.html" title="interface in javax.servlet.http"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javax/servlet/http/HttpServletRequest.html" target="_top">Frames</a></li>
<li><a href="HttpServletRequest.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>