This file is indexed.

/usr/share/doc/libservlet3.1-java/api/javax/servlet/http/Cookie.html is in libservlet3.1-java-doc 8.5.30-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
<!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>Cookie (Tomcat API Documentation)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Cookie (Tomcat API Documentation)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= 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>Prev&nbsp;Class</li>
<li><a href="../../../javax/servlet/http/HttpServlet.html" title="class in javax.servlet.http"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javax/servlet/http/Cookie.html" target="_top">Frames</a></li>
<li><a href="Cookie.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../javax/servlet/http/package-summary.html">javax.servlet.http</a></div>
<h2 title="Class Cookie" class="title">Class Cookie</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>javax.servlet.http.Cookie</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.io.Serializable</code>, <code>java.lang.Cloneable</code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">Cookie</span>
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable</pre>
<div class="block">Creates a cookie, a small amount of information sent by a servlet to a Web
 browser, saved by the browser, and later sent back to the server. A cookie's
 value can uniquely identify a client, so cookies are commonly used for
 session management.
 <p>
 A cookie has a name, a single value, and optional attributes such as a
 comment, path and domain qualifiers, a maximum age, and a version number.
 Some Web browsers have bugs in how they handle the optional attributes, so
 use them sparingly to improve the interoperability of your servlets.
 <p>
 The servlet sends cookies to the browser by using the
 <a href="../../../javax/servlet/http/HttpServletResponse.html#addCookie-javax.servlet.http.Cookie-"><code>HttpServletResponse.addCookie(javax.servlet.http.Cookie)</code></a> method, which adds fields to HTTP
 response headers to send cookies to the browser, one at a time. The browser
 is expected to support 20 cookies for each Web server, 300 cookies total, and
 may limit cookie size to 4 KB each.
 <p>
 The browser returns cookies to the servlet by adding fields to HTTP request
 headers. Cookies can be retrieved from a request by using the
 <a href="../../../javax/servlet/http/HttpServletRequest.html#getCookies--"><code>HttpServletRequest.getCookies()</code></a> method. Several cookies might have the
 same name but different path attributes.
 <p>
 Cookies affect the caching of the Web pages that use them. HTTP 1.0 does not
 cache pages that use cookies created with this class. This class does not
 support the cache control defined with HTTP 1.1.
 <p>
 This class supports both the RFC 2109 and the RFC 6265 specifications.
 By default, cookies are created using RFC 6265.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../serialized-form.html#javax.servlet.http.Cookie">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#Cookie-java.lang.String-java.lang.String-">Cookie</a></span>&#8203;(java.lang.String&nbsp;name,
      java.lang.String&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Constructs a cookie with a specified name and value.</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" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#clone--">clone</a></span>()</code></th>
<td class="colLast">
<div class="block">Overrides the standard <code>java.lang.Object.clone</code> method to
 return a copy of this cookie.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getComment--">getComment</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the comment describing the purpose of this cookie, or
 <code>null</code> if the cookie has no comment.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getDomain--">getDomain</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the domain name set for this cookie.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getMaxAge--">getMaxAge</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the maximum age of the cookie, specified in seconds, By default,
 <code>-1</code> indicating the cookie will persist until browser
 shutdown.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getName--">getName</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the name of the cookie.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getPath--">getPath</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the path on the server to which the browser returns this cookie.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getSecure--">getSecure</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the browser is sending cookies only over a
 secure protocol, or <code>false</code> if the browser can send cookies
 using any protocol.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getValue--">getValue</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the value of the cookie.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#getVersion--">getVersion</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the version of the protocol this cookie complies with.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#isHttpOnly--">isHttpOnly</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the flag that controls if this cookie will be hidden from scripts on
 the client side.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setComment-java.lang.String-">setComment</a></span>&#8203;(java.lang.String&nbsp;purpose)</code></th>
<td class="colLast">
<div class="block">Specifies a comment that describes a cookie's purpose.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setDomain-java.lang.String-">setDomain</a></span>&#8203;(java.lang.String&nbsp;pattern)</code></th>
<td class="colLast">
<div class="block">Specifies the domain within which this cookie should be presented.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setHttpOnly-boolean-">setHttpOnly</a></span>&#8203;(boolean&nbsp;httpOnly)</code></th>
<td class="colLast">
<div class="block">Sets the flag that controls if this cookie will be hidden from scripts on
 the client side.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setMaxAge-int-">setMaxAge</a></span>&#8203;(int&nbsp;expiry)</code></th>
<td class="colLast">
<div class="block">Sets the maximum age of the cookie in seconds.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setPath-java.lang.String-">setPath</a></span>&#8203;(java.lang.String&nbsp;uri)</code></th>
<td class="colLast">
<div class="block">Specifies a path for the cookie to which the client should return the
 cookie.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setSecure-boolean-">setSecure</a></span>&#8203;(boolean&nbsp;flag)</code></th>
<td class="colLast">
<div class="block">Indicates to the browser whether the cookie should only be sent using a
 secure protocol, such as HTTPS or SSL.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setValue-java.lang.String-">setValue</a></span>&#8203;(java.lang.String&nbsp;newValue)</code></th>
<td class="colLast">
<div class="block">Assigns a new value to a cookie after the cookie is created.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Cookie.html#setVersion-int-">setVersion</a></span>&#8203;(int&nbsp;v)</code></th>
<td class="colLast">
<div class="block">Sets the version of the cookie protocol this cookie complies with.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Cookie-java.lang.String-java.lang.String-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Cookie</h4>
<pre>public&nbsp;Cookie&#8203;(java.lang.String&nbsp;name,
              java.lang.String&nbsp;value)</pre>
<div class="block">Constructs a cookie with a specified name and value.
 <p>
 The name must conform to RFC 2109. That means it can contain only ASCII
 alphanumeric characters and cannot contain commas, semicolons, or white
 space or begin with a $ character. The cookie's name cannot be changed
 after creation.
 <p>
 The value can be anything the server chooses to send. Its value is
 probably of interest only to the server. The cookie's value can be
 changed after creation with the <code>setValue</code> method.
 <p>
 By default, cookies are created according to the Netscape cookie
 specification. The version can be changed with the
 <code>setVersion</code> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the name of the cookie</dd>
<dd><code>value</code> - a <code>String</code> specifying the value of the cookie</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the cookie name contains illegal characters (for example,
             a comma, space, or semicolon) or it is one of the tokens
             reserved for use by the cookie protocol</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setValue-java.lang.String-"><code>setValue(java.lang.String)</code></a>, 
<a href="../../../javax/servlet/http/Cookie.html#setVersion-int-"><code>setVersion(int)</code></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="setComment-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setComment</h4>
<pre>public&nbsp;void&nbsp;setComment&#8203;(java.lang.String&nbsp;purpose)</pre>
<div class="block">Specifies a comment that describes a cookie's purpose. The comment is
 useful if the browser presents the cookie to the user. Comments are not
 supported by Netscape Version 0 cookies.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>purpose</code> - a <code>String</code> specifying the comment to display to the
            user</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getComment--"><code>getComment()</code></a></dd>
</dl>
</li>
</ul>
<a name="getComment--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getComment</h4>
<pre>public&nbsp;java.lang.String&nbsp;getComment()</pre>
<div class="block">Returns the comment describing the purpose of this cookie, or
 <code>null</code> if the cookie has no comment.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing the comment, or
         <code>null</code> if none</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setComment-java.lang.String-"><code>setComment(java.lang.String)</code></a></dd>
</dl>
</li>
</ul>
<a name="setDomain-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDomain</h4>
<pre>public&nbsp;void&nbsp;setDomain&#8203;(java.lang.String&nbsp;pattern)</pre>
<div class="block">Specifies the domain within which this cookie should be presented.
 <p>
 The form of the domain name is specified by RFC 2109. A domain name
 begins with a dot (<code>.foo.com</code>) and means that the cookie is
 visible to servers in a specified Domain Name System (DNS) zone (for
 example, <code>www.foo.com</code>, but not <code>a.b.foo.com</code>). By
 default, cookies are only returned to the server that sent them.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pattern</code> - a <code>String</code> containing the domain name within which
            this cookie is visible; form is according to RFC 2109</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getDomain--"><code>getDomain()</code></a></dd>
</dl>
</li>
</ul>
<a name="getDomain--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDomain</h4>
<pre>public&nbsp;java.lang.String&nbsp;getDomain()</pre>
<div class="block">Returns the domain name set for this cookie. The form of the domain name
 is set by RFC 2109.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing the domain name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setDomain-java.lang.String-"><code>setDomain(java.lang.String)</code></a></dd>
</dl>
</li>
</ul>
<a name="setMaxAge-int-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxAge</h4>
<pre>public&nbsp;void&nbsp;setMaxAge&#8203;(int&nbsp;expiry)</pre>
<div class="block">Sets the maximum age of the cookie in seconds.
 <p>
 A positive value indicates that the cookie will expire after that many
 seconds have passed. Note that the value is the <i>maximum</i> age when
 the cookie will expire, not the cookie's current age.
 <p>
 A negative value means that the cookie is not stored persistently and
 will be deleted when the Web browser exits. A zero value causes the
 cookie to be deleted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expiry</code> - an integer specifying the maximum age of the cookie in
            seconds; if negative, means the cookie is not stored; if zero,
            deletes the cookie</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getMaxAge--"><code>getMaxAge()</code></a></dd>
</dl>
</li>
</ul>
<a name="getMaxAge--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxAge</h4>
<pre>public&nbsp;int&nbsp;getMaxAge()</pre>
<div class="block">Returns the maximum age of the cookie, specified in seconds, By default,
 <code>-1</code> indicating the cookie will persist until browser
 shutdown.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an integer specifying the maximum age of the cookie in seconds; if
         negative, means the cookie persists until browser shutdown</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setMaxAge-int-"><code>setMaxAge(int)</code></a></dd>
</dl>
</li>
</ul>
<a name="setPath-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPath</h4>
<pre>public&nbsp;void&nbsp;setPath&#8203;(java.lang.String&nbsp;uri)</pre>
<div class="block">Specifies a path for the cookie to which the client should return the
 cookie.
 <p>
 The cookie is visible to all the pages in the directory you specify, and
 all the pages in that directory's subdirectories. A cookie's path must
 include the servlet that set the cookie, for example, <i>/catalog</i>,
 which makes the cookie visible to all directories on the server under
 <i>/catalog</i>.
 <p>
 Consult RFC 2109 (available on the Internet) for more information on
 setting path names for cookies.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - a <code>String</code> specifying a path</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getPath--"><code>getPath()</code></a></dd>
</dl>
</li>
</ul>
<a name="getPath--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPath</h4>
<pre>public&nbsp;java.lang.String&nbsp;getPath()</pre>
<div class="block">Returns the path on the server to which the browser returns this cookie.
 The cookie is visible to all subpaths on the server.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> specifying a path that contains a servlet
         name, for example, <i>/catalog</i></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setPath-java.lang.String-"><code>setPath(java.lang.String)</code></a></dd>
</dl>
</li>
</ul>
<a name="setSecure-boolean-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSecure</h4>
<pre>public&nbsp;void&nbsp;setSecure&#8203;(boolean&nbsp;flag)</pre>
<div class="block">Indicates to the browser whether the cookie should only be sent using a
 secure protocol, such as HTTPS or SSL.
 <p>
 The default value is <code>false</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>flag</code> - if <code>true</code>, sends the cookie from the browser to the
            server only when using a secure protocol; if
            <code>false</code>, sent on any protocol</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getSecure--"><code>getSecure()</code></a></dd>
</dl>
</li>
</ul>
<a name="getSecure--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSecure</h4>
<pre>public&nbsp;boolean&nbsp;getSecure()</pre>
<div class="block">Returns <code>true</code> if the browser is sending cookies only over a
 secure protocol, or <code>false</code> if the browser can send cookies
 using any protocol.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the browser uses a secure protocol;
         otherwise, <code>true</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setSecure-boolean-"><code>setSecure(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="getName--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
<div class="block">Returns the name of the cookie. The name cannot be changed after
 creation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> specifying the cookie's name</dd>
</dl>
</li>
</ul>
<a name="setValue-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValue</h4>
<pre>public&nbsp;void&nbsp;setValue&#8203;(java.lang.String&nbsp;newValue)</pre>
<div class="block">Assigns a new value to a cookie after the cookie is created. If you use a
 binary value, you may want to use BASE64 encoding.
 <p>
 With Version 0 cookies, values should not contain white space, brackets,
 parentheses, equals signs, commas, double quotes, slashes, question
 marks, at signs, colons, and semicolons. Empty values may not behave the
 same way on all browsers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newValue</code> - a <code>String</code> specifying the new value</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getValue--"><code>getValue()</code></a>, 
<a href="../../../javax/servlet/http/Cookie.html" title="class in javax.servlet.http"><code>Cookie</code></a></dd>
</dl>
</li>
</ul>
<a name="getValue--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre>public&nbsp;java.lang.String&nbsp;getValue()</pre>
<div class="block">Returns the value of the cookie.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>String</code> containing the cookie's present value</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setValue-java.lang.String-"><code>setValue(java.lang.String)</code></a>, 
<a href="../../../javax/servlet/http/Cookie.html" title="class in javax.servlet.http"><code>Cookie</code></a></dd>
</dl>
</li>
</ul>
<a name="getVersion--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVersion</h4>
<pre>public&nbsp;int&nbsp;getVersion()</pre>
<div class="block">Returns the version of the protocol this cookie complies with. Version 1
 complies with RFC 2109, and version 0 complies with the original cookie
 specification drafted by Netscape. Cookies provided by a browser use and
 identify the browser's cookie version.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>0 if the cookie complies with the original Netscape specification;
         1 if the cookie complies with RFC 2109</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#setVersion-int-"><code>setVersion(int)</code></a></dd>
</dl>
</li>
</ul>
<a name="setVersion-int-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setVersion</h4>
<pre>public&nbsp;void&nbsp;setVersion&#8203;(int&nbsp;v)</pre>
<div class="block">Sets the version of the cookie protocol this cookie complies with.
 Version 0 complies with the original Netscape cookie specification.
 Version 1 complies with RFC 2109.
 <p>
 Since RFC 2109 is still somewhat new, consider version 1 as experimental;
 do not use it yet on production sites.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>v</code> - 0 if the cookie should comply with the original Netscape
            specification; 1 if the cookie should comply with RFC 2109</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/servlet/http/Cookie.html#getVersion--"><code>getVersion()</code></a></dd>
</dl>
</li>
</ul>
<a name="clone--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>public&nbsp;java.lang.Object&nbsp;clone()</pre>
<div class="block">Overrides the standard <code>java.lang.Object.clone</code> method to
 return a copy of this cookie.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>clone</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="setHttpOnly-boolean-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHttpOnly</h4>
<pre>public&nbsp;void&nbsp;setHttpOnly&#8203;(boolean&nbsp;httpOnly)</pre>
<div class="block">Sets the flag that controls if this cookie will be hidden from scripts on
 the client side.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>httpOnly</code> - The new value of the flag</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.0</dd>
</dl>
</li>
</ul>
<a name="isHttpOnly--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isHttpOnly</h4>
<pre>public&nbsp;boolean&nbsp;isHttpOnly()</pre>
<div class="block">Gets the flag that controls if this cookie will be hidden from scripts on
 the client side.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the cookie is hidden from scripts, else
          <code>false</code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Servlet 3.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>Prev&nbsp;Class</li>
<li><a href="../../../javax/servlet/http/HttpServlet.html" title="class in javax.servlet.http"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javax/servlet/http/Cookie.html" target="_top">Frames</a></li>
<li><a href="Cookie.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2000-2016 The Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>