/usr/share/doc/libservlet3.1-java/api/javax/servlet/http/HttpServletRequest.html is in libservlet3.1-java-doc 8.0.32-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html>
<head>
<!-- Generated by javadoc -->
<title>HttpServletRequest (Tomcat API Documentation)</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 (Tomcat API Documentation)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"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":6,"i25":38,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/HttpServlet.html" title="class in javax.servlet.http"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http"><span class="typeNameLink">Next 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 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">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 Implementing Classes:</dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http">HttpServletRequestWrapper</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"> </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"> </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="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="../../../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> response)</code>
<div class="block">Triggers the same authentication process as would be triggered if the
request is for a resource that is protected by a security constraint.</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">Changes the session ID of the session associated with this request.</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 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 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="../../../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<java.lang.String></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 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>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 name)</code>
<div class="block">Returns the value of the specified request header as an <code>int</code>.</div>
</td>
</tr>
<tr id="i10" 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#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="i11" class="rowColor">
<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 name)</code>
<div class="block">Gets the named Part or null if the Part does not exist.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.Collection<<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#getParts--">getParts</a></span>()</code>
<div class="block">Return a collection of all uploaded Parts.</div>
</td>
</tr>
<tr id="i13" 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#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="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#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="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#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="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#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="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#getRequestedSessionId--">getRequestedSessionId</a></span>()</code>
<div class="block">Returns the session ID specified by the client.</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#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="i19" class="rowColor">
<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="i20" 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#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="i21" 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--">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="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-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="i23" 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="i24" 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 came in as a cookie.</div>
</td>
</tr>
<tr id="i25" 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>
<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="i26" 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 came in as part of the request
URL.</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#isRequestedSessionIdValid--">isRequestedSessionIdValid</a></span>()</code>
<div class="block">Checks whether the requested session ID is still valid.</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#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="i29" class="rowColor">
<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 username,
java.lang.String password)</code>
<div class="block">Authenticate the provided user name and password and then associated the
authenticated user with the request.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<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">Removes any authenticated user from the request.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code><T extends <a href="../../../javax/servlet/http/HttpUpgradeHandler.html" title="interface in javax.servlet.http">HttpUpgradeHandler</a>><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<T> httpUpgradeHandlerClass)</code>
<div class="block">Start the HTTP upgrade process and pass the connection to the provided
protocol handler once the current request/response pair has completed
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 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 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 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 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 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 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>[] 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="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="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.</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>
</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>.</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="../../../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 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/HttpServletRequest.html#getRequestURL--"><code>getRequestURL()</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/HttpServletRequest.html#getRequestURL--"><code>getRequestURL()</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>
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="../../../javax/servlet/http/HttpSession.html" title="interface in javax.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="../../../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> 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 changeSessionId()</pre>
<div class="block">Changes the session ID of the session associated with this request. This
method does not create a new session object it only changes the ID of the
current session.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new session ID allocated to the session</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/HttpSessionIdListener.html" title="interface in javax.servlet.http"><code>HttpSessionIdListener</code></a></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.</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></dd>
</dl>
</li>
</ul>
<a name="isRequestedSessionIdFromCookie--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequestedSessionIdFromCookie</h4>
<pre>boolean isRequestedSessionIdFromCookie()</pre>
<div class="block">Checks whether the requested session ID came in as a cookie.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the session ID came in as a 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 isRequestedSessionIdFromURL()</pre>
<div class="block">Checks whether the requested session ID came in as part of the request
URL.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the session ID came in 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>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="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromURL--"><code>isRequestedSessionIdFromURL()</code></a> instead.</span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromURL--"><code>isRequestedSessionIdFromURL()</code></a></dd>
</dl>
</li>
</ul>
<a name="authenticate-javax.servlet.http.HttpServletResponse-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>authenticate</h4>
<pre>boolean authenticate(<a href="../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http">HttpServletResponse</a> response)
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Triggers the same authentication process as would be triggered if the
request is for a resource that is protected by a security constraint.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>response</code> - The response to use to return any authentication
challenge</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the user is successfully authenticated and
<code>false</code> if not</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if the authentication process attempted to read from
the request or write to the response and an I/O error occurred</dd>
<dd><code>java.lang.IllegalStateException</code> - if the authentication process attempted to
write to the response after it had been 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
expected to handle the failure</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="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Authenticate the provided user name and password and then associated the
authenticated user with the request.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>username</code> - The user name to authenticate</dd>
<dd><code>password</code> - The password to use to authenticate the 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 any of <a href="../../../javax/servlet/http/HttpServletRequest.html#getRemoteUser--"><code>getRemoteUser()</code></a>,
<a href="../../../javax/servlet/http/HttpServletRequest.html#getUserPrincipal--"><code>getUserPrincipal()</code></a> or <a href="../../../javax/servlet/http/HttpServletRequest.html#getAuthType--"><code>getAuthType()</code></a> are
non-null, if the configured authenticator does not support
user name and password authentication or if the
authentication 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="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Removes any authenticated user from 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 the 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="../../../javax/servlet/http/Part.html" title="interface in javax.servlet.http">Part</a>> getParts()
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Return a collection of all uploaded Parts.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A collection of all uploaded Parts.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs</dd>
<dd><code>java.lang.IllegalStateException</code> - if size limits are exceeded or no multipart configuration is
provided</dd>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if the request is not multipart/form-data</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</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> getPart(java.lang.String name)
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Gets the named Part or null if the Part does not exist. Triggers upload
of all Parts.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the Part to obtain</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The named Part or null if the Part does not exist</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs</dd>
<dd><code>java.lang.IllegalStateException</code> - if size limits are exceeded</dd>
<dd><code><a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></code> - if the request is not multipart/form-data</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
</dl>
</li>
</ul>
<a name="upgrade-java.lang.Class-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>upgrade</h4>
<pre><T extends <a href="../../../javax/servlet/http/HttpUpgradeHandler.html" title="interface in javax.servlet.http">HttpUpgradeHandler</a>> T upgrade(java.lang.Class<T> httpUpgradeHandlerClass)
throws java.io.IOException,
<a href="../../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</a></pre>
<div class="block">Start the HTTP upgrade process and pass the connection to the provided
protocol handler once the current request/response pair has completed
processing. Calling this method sets the response status to <a href="../../../javax/servlet/http/HttpServletResponse.html#SC_SWITCHING_PROTOCOLS"><code>HttpServletResponse.SC_SWITCHING_PROTOCOLS</code></a> and flushes the response.
Protocol specific headers must have already been set before this method
is called.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the upgrade handler</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>httpUpgradeHandlerClass</code> - The class that implements the upgrade
handler</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A newly created instance of the specified upgrade handler type</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 httpUpgradeHandlerClass fails to be instantiated</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.1</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/HttpServlet.html" title="class in javax.servlet.http"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http"><span class="typeNameLink">Next 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 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 ======= -->
<p class="legalCopy"><small>Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>
|