| <!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="../../../jakarta/servlet/http/HttpServletMapping.html" title="interface in jakarta.servlet.http"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/servlet/http/HttpServletRequestWrapper.html" title="class in jakarta.servlet.http"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/servlet/http/HttpServletRequest.html" target="_top">Frames</a></li> |
| <li><a href="HttpServletRequest.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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">jakarta.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="../../../jakarta/servlet/ServletRequest.html" title="interface in jakarta.servlet">ServletRequest</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../jakarta/servlet/http/HttpServletRequestWrapper.html" title="class in jakarta.servlet.http">HttpServletRequestWrapper</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">HttpServletRequest</span> |
| extends <a href="../../../jakarta/servlet/ServletRequest.html" title="interface in jakarta.servlet">ServletRequest</a></pre> |
| <div class="block">Extends the <a href="../../../jakarta/servlet/ServletRequest.html" title="interface in jakarta.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"> </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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </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="../../../jakarta/servlet/http/HttpServletRequest.html#authenticate-jakarta.servlet.http.HttpServletResponse-">authenticate</a></span>(<a href="../../../jakarta/servlet/http/HttpServletResponse.html" title="interface in jakarta.servlet.http">HttpServletResponse</a> 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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/servlet/http/Cookie.html" title="class in jakarta.servlet.http">Cookie</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/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="../../../jakarta/servlet/http/HttpServletRequest.html#getDateHeader-java.lang.String-">getDateHeader</a></span>(java.lang.String 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="../../../jakarta/servlet/http/HttpServletRequest.html#getHeader-java.lang.String-">getHeader</a></span>(java.lang.String 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<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/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<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#getHeaders-java.lang.String-">getHeaders</a></span>(java.lang.String 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="../../../jakarta/servlet/http/HttpServletMapping.html" title="interface in jakarta.servlet.http">HttpServletMapping</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#getHttpServletMapping--">getHttpServletMapping</a></span>()</code> |
| <div class="block">Return the HttpServletMapping of the request.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#getIntHeader-java.lang.String-">getIntHeader</a></span>(java.lang.String 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="../../../jakarta/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="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.servlet.http">Part</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#getPart-java.lang.String-">getPart</a></span>(java.lang.String name)</code> |
| <div class="block">Gets the <a href="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.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<<a href="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.servlet.http">Part</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#getParts--">getParts</a></span>()</code> |
| <div class="block">Gets all the <a href="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/servlet/http/HttpSession.html" title="interface in jakarta.servlet.http">HttpSession</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/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="../../../jakarta/servlet/http/HttpSession.html" title="interface in jakarta.servlet.http">HttpSession</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#getSession-boolean-">getSession</a></span>(boolean 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<java.lang.String,java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromUrl--">isRequestedSessionIdFromUrl</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">As of Version 2.1 of the Java Servlet API, use <a href="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/servlet/http/HttpServletRequest.html#isUserInRole-java.lang.String-">isUserInRole</a></span>(java.lang.String 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="../../../jakarta/servlet/http/HttpServletRequest.html#login-java.lang.String-java.lang.String-">login</a></span>(java.lang.String username, |
| java.lang.String 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="../../../jakarta/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="../../../jakarta/servlet/http/PushBuilder.html" title="interface in jakarta.servlet.http">PushBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#newPushBuilder--">newPushBuilder</a></span>()</code> |
| <div class="block">Instantiates a new instance of <a href="../../../jakarta/servlet/http/PushBuilder.html" title="interface in jakarta.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><T extends <a href="../../../jakarta/servlet/http/HttpUpgradeHandler.html" title="interface in jakarta.servlet.http">HttpUpgradeHandler</a>><br>T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/servlet/http/HttpServletRequest.html#upgrade-java.lang.Class-">upgrade</a></span>(java.lang.Class<T> 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.jakarta.servlet.ServletRequest"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface jakarta.servlet.<a href="../../../jakarta/servlet/ServletRequest.html" title="interface in jakarta.servlet">ServletRequest</a></h3> |
| <code><a href="../../../jakarta/servlet/ServletRequest.html#getAsyncContext--">getAsyncContext</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getAttribute-java.lang.String-">getAttribute</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getAttributeNames--">getAttributeNames</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getCharacterEncoding--">getCharacterEncoding</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getContentLength--">getContentLength</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getContentLengthLong--">getContentLengthLong</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getContentType--">getContentType</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getDispatcherType--">getDispatcherType</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getInputStream--">getInputStream</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getLocalAddr--">getLocalAddr</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getLocale--">getLocale</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getLocales--">getLocales</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getLocalName--">getLocalName</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getLocalPort--">getLocalPort</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getParameter-java.lang.String-">getParameter</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getParameterMap--">getParameterMap</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getParameterNames--">getParameterNames</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getParameterValues-java.lang.String-">getParameterValues</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getProtocol--">getProtocol</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getReader--">getReader</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getRealPath-java.lang.String-">getRealPath</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getRemoteAddr--">getRemoteAddr</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getRemoteHost--">getRemoteHost</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getRemotePort--">getRemotePort</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getRequestDispatcher-java.lang.String-">getRequestDispatcher</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getScheme--">getScheme</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getServerName--">getServerName</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getServerPort--">getServerPort</a>, <a href="../../../jakarta/servlet/ServletRequest.html#getServletContext--">getServletContext</a>, <a href="../../../jakarta/servlet/ServletRequest.html#isAsyncStarted--">isAsyncStarted</a>, <a href="../../../jakarta/servlet/ServletRequest.html#isAsyncSupported--">isAsyncSupported</a>, <a href="../../../jakarta/servlet/ServletRequest.html#isSecure--">isSecure</a>, <a href="../../../jakarta/servlet/ServletRequest.html#removeAttribute-java.lang.String-">removeAttribute</a>, <a href="../../../jakarta/servlet/ServletRequest.html#setAttribute-java.lang.String-java.lang.Object-">setAttribute</a>, <a href="../../../jakarta/servlet/ServletRequest.html#setCharacterEncoding-java.lang.String-">setCharacterEncoding</a>, <a href="../../../jakarta/servlet/ServletRequest.html#startAsync--">startAsync</a>, <a href="../../../jakarta/servlet/ServletRequest.html#startAsync-jakarta.servlet.ServletRequest-jakarta.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 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#jakarta.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 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#jakarta.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 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#jakarta.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 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#jakarta.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 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="../../../jakarta/servlet/http/Cookie.html" title="class in jakarta.servlet.http">Cookie</a>[] 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 getDateHeader(java.lang.String 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 getHeader(java.lang.String 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<java.lang.String> getHeaders(java.lang.String 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<java.lang.String> 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 getIntHeader(java.lang.String 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 <a href="../../../jakarta/servlet/http/HttpServletMapping.html" title="interface in jakarta.servlet.http">HttpServletMapping</a> getHttpServletMapping()</pre> |
| <div class="block">Return the HttpServletMapping of the request. |
| <p> |
| The mapping returned depends on the current <a href="../../../jakarta/servlet/DispatcherType.html" title="enum in jakarta.servlet"><code>DispatcherType</code></a> as obtained from |
| <a href="../../../jakarta/servlet/ServletRequest.html#getDispatcherType--"><code>ServletRequest.getDispatcherType()</code></a>: |
| <dl> |
| <dt><a href="../../../jakarta/servlet/DispatcherType.html#REQUEST"><code>DispatcherType.REQUEST</code></a>, <a href="../../../jakarta/servlet/DispatcherType.html#ASYNC"><code>DispatcherType.ASYNC</code></a>, |
| <a href="../../../jakarta/servlet/DispatcherType.html#ERROR"><code>DispatcherType.ERROR</code></a></dt> |
| <dd>Return the mapping for the target of the dispatch i.e. the mapping for the current |
| <a href="../../../jakarta/servlet/Servlet.html" title="interface in jakarta.servlet"><code>Servlet</code></a>.</dd> |
| |
| <dt><a href="../../../jakarta/servlet/DispatcherType.html#INCLUDE"><code>DispatcherType.INCLUDE</code></a></dt> |
| <dd>Return the mapping as prior to the current dispatch. i.e the mapping returned is unchanged by a call to</dd> |
| <a href="../../../jakarta/servlet/RequestDispatcher.html#include-jakarta.servlet.ServletRequest-jakarta.servlet.ServletResponse-"><code>RequestDispatcher.include(ServletRequest, ServletResponse)</code></a>. |
| |
| <dt><a href="../../../jakarta/servlet/DispatcherType.html#FORWARD"><code>DispatcherType.FORWARD</code></a></dt> |
| <dd>Return the mapping for the target of the dispatch i.e. the mapping for the current |
| <a href="../../../jakarta/servlet/Servlet.html" title="interface in jakarta.servlet"><code>Servlet</code></a>, unless the <a href="../../../jakarta/servlet/RequestDispatcher.html" title="interface in jakarta.servlet"><code>RequestDispatcher</code></a> was obtained via |
| <a href="../../../jakarta/servlet/ServletContext.html#getNamedDispatcher-java.lang.String-"><code>ServletContext.getNamedDispatcher(String)</code></a>, in which case return the mapping as prior to the |
| current dispatch. i.e the mapping returned is changed during a call to |
| <a href="../../../jakarta/servlet/RequestDispatcher.html#forward-jakarta.servlet.ServletRequest-jakarta.servlet.ServletResponse-"><code>RequestDispatcher.forward(ServletRequest, ServletResponse)</code></a> only if the dispatcher is not a named |
| dispatcher.</dd> |
| </dl> |
| </p> |
| <p> |
| For example: |
| <ul> |
| <li>For a sequence Servlet1 --include--> Servlet2 --include--> Servlet3, a call to this |
| method in Servlet3 will return the mapping for Servlet1.</li> |
| <li>For a sequence Servlet1 --async--> Servlet2 --named-forward--> Servlet3, a call to this |
| method in Servlet3 will return the mapping for Servlet2.</li> |
| </ul> |
| </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 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 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 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 <a href="../../../jakarta/servlet/http/PushBuilder.html" title="interface in jakarta.servlet.http">PushBuilder</a> newPushBuilder()</pre> |
| <div class="block">Instantiates a new instance of <a href="../../../jakarta/servlet/http/PushBuilder.html" title="interface in jakarta.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="../../../jakarta/servlet/http/PushBuilder.html" title="interface in jakarta.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 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="../../../jakarta/servlet/ServletContext.html#getContextPath--"><code>ServletContext.getContextPath()</code></a> method. The context path returned by |
| <a href="../../../jakarta/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="../../../jakarta/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 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 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 isUserInRole(java.lang.String 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="../../../jakarta/servlet/http/HttpServletRequest.html#getRemoteUser--"><code>getRemoteUser()</code></a> and |
| <a href="../../../jakarta/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 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 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="../../../jakarta/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 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="../../../jakarta/servlet/http/HttpUtils.html#getRequestURL-jakarta.servlet.http.HttpServletRequest-"><code>HttpUtils.getRequestURL(jakarta.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="../../../jakarta/servlet/http/HttpUtils.html#getRequestURL-jakarta.servlet.http.HttpServletRequest-"><code>HttpUtils.getRequestURL(jakarta.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 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="../../../jakarta/servlet/RequestDispatcher.html#forward-jakarta.servlet.ServletRequest-jakarta.servlet.ServletResponse-"><code>RequestDispatcher.forward(jakarta.servlet.ServletRequest, jakarta.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 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="../../../jakarta/servlet/http/HttpSession.html" title="interface in jakarta.servlet.http">HttpSession</a> getSession(boolean 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="../../../jakarta/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="../../../jakarta/servlet/http/HttpSession.html" title="interface in jakarta.servlet.http">HttpSession</a> 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="../../../jakarta/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 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 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="../../../jakarta/servlet/http/HttpServletRequest.html#getRequestedSessionId--"><code>getRequestedSessionId()</code></a>, |
| <a href="../../../jakarta/servlet/http/HttpServletRequest.html#getSession-boolean-"><code>getSession(boolean)</code></a>, |
| <a href="../../../jakarta/servlet/http/HttpSessionContext.html" title="interface in jakarta.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 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="../../../jakarta/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 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="../../../jakarta/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 isRequestedSessionIdFromUrl()</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of Version 2.1 of the Java Servlet API, use <a href="../../../jakarta/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-jakarta.servlet.http.HttpServletResponse-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>authenticate</h4> |
| <pre>boolean authenticate(<a href="../../../jakarta/servlet/http/HttpServletResponse.html" title="interface in jakarta.servlet.http">HttpServletResponse</a> response) |
| throws java.io.IOException, |
| <a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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 login(java.lang.String username, |
| java.lang.String password) |
| throws <a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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 logout() |
| throws <a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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<<a href="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.servlet.http">Part</a>> getParts() |
| throws java.io.IOException, |
| <a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.servlet">ServletException</a></pre> |
| <div class="block">Gets all the <a href="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.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="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.servlet.http"><code>Part</code></a> components of this request</dd> |
| <dd><code><a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/annotation/MultipartConfig.html#maxFileSize--"><code>MultipartConfig.maxFileSize()</code></a>, |
| <a href="../../../jakarta/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="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.servlet.http">Part</a> getPart(java.lang.String name) |
| throws java.io.IOException, |
| <a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.servlet">ServletException</a></pre> |
| <div class="block">Gets the <a href="../../../jakarta/servlet/http/Part.html" title="interface in jakarta.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="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/annotation/MultipartConfig.html#maxFileSize--"><code>MultipartConfig.maxFileSize()</code></a>, |
| <a href="../../../jakarta/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><T extends <a href="../../../jakarta/servlet/http/HttpUpgradeHandler.html" title="interface in jakarta.servlet.http">HttpUpgradeHandler</a>> T upgrade(java.lang.Class<T> handlerClass) |
| throws java.io.IOException, |
| <a href="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/http/HttpUpgradeHandler.html" title="interface in jakarta.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="../../../jakarta/servlet/ServletException.html" title="class in jakarta.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="../../../jakarta/servlet/http/HttpUpgradeHandler.html" title="interface in jakarta.servlet.http"><code>HttpUpgradeHandler</code></a>, |
| <a href="../../../jakarta/servlet/http/WebConnection.html" title="interface in jakarta.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 java.util.Map<java.lang.String,java.lang.String> 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="../../../jakarta/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="../../../jakarta/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="../../../jakarta/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 boolean isTrailerFieldsReady()</pre> |
| <div class="block">Return a boolean indicating whether trailer fields are ready to read using <a href="../../../jakarta/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="../../../jakarta/servlet/ServletRequest.html#getReader--"><code>ServletRequest.getReader()</code></a> |
| or <a href="../../../jakarta/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="../../../jakarta/servlet/http/HttpServletMapping.html" title="interface in jakarta.servlet.http"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/servlet/http/HttpServletRequestWrapper.html" title="class in jakarta.servlet.http"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/servlet/http/HttpServletRequest.html" target="_top">Frames</a></li> |
| <li><a href="HttpServletRequest.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |