| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>SessionCookieConfig</title> |
| <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="SessionCookieConfig"; |
| } |
| } |
| 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}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/ServletSecurityElement.html" title="class in javax.servlet"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/servlet/SessionTrackingMode.html" title="enum in javax.servlet"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/servlet/SessionCookieConfig.html" target="_top">Frames</a></li> |
| <li><a href="SessionCookieConfig.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>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </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</div> |
| <h2 title="Interface SessionCookieConfig" class="title">Interface SessionCookieConfig</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">SessionCookieConfig</span></pre> |
| <div class="block">Class that may be used to configure various properties of cookies used for session tracking purposes. |
| |
| <p> |
| An instance of this class is acquired by a call to <a href="../../javax/servlet/ServletContext.html#getSessionCookieConfig--"><code>ServletContext.getSessionCookieConfig()</code></a>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>Servlet 3.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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></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>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#getComment--">getComment</a></span>()</code> |
| <div class="block">Gets the comment that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</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/SessionCookieConfig.html#getDomain--">getDomain</a></span>()</code> |
| <div class="block">Gets the domain name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#getMaxAge--">getMaxAge</a></span>()</code> |
| <div class="block">Gets the lifetime (in seconds) of the session tracking cookies created on behalf of the application represented |
| by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</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/SessionCookieConfig.html#getName--">getName</a></span>()</code> |
| <div class="block">Gets the name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#getPath--">getPath</a></span>()</code> |
| <div class="block">Gets the path that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#isHttpOnly--">isHttpOnly</a></span>()</code> |
| <div class="block">Checks if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired will be marked as |
| <i>HttpOnly</i>.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#isSecure--">isSecure</a></span>()</code> |
| <div class="block">Checks if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired will be marked as <i>secure</i> |
| even if the request that initiated the corresponding session is using plain HTTP instead of HTTPS.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setComment-java.lang.String-">setComment</a></span>(java.lang.String comment)</code> |
| <div class="block">Sets the comment that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setDomain-java.lang.String-">setDomain</a></span>(java.lang.String domain)</code> |
| <div class="block">Sets the domain name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setHttpOnly-boolean-">setHttpOnly</a></span>(boolean httpOnly)</code> |
| <div class="block">Marks or unmarks the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired as <i>HttpOnly</i>.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setMaxAge-int-">setMaxAge</a></span>(int maxAge)</code> |
| <div class="block">Sets the lifetime (in seconds) for the session tracking cookies created on behalf of the application represented |
| by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setName-java.lang.String-">setName</a></span>(java.lang.String name)</code> |
| <div class="block">Sets the name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setPath-java.lang.String-">setPath</a></span>(java.lang.String path)</code> |
| <div class="block">Sets the path that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/servlet/SessionCookieConfig.html#setSecure-boolean-">setSecure</a></span>(boolean secure)</code> |
| <div class="block">Marks or unmarks the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired as <i>secure</i>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setName-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setName</h4> |
| <pre>void setName(java.lang.String name)</pre> |
| <div class="block">Sets the name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired. |
| |
| <p> |
| NOTE: Changing the name of session tracking cookies may break other tiers (for example, a load balancing |
| frontend) that assume the cookie name to be equal to the default <tt>JSESSIONID</tt>, and therefore should only |
| be done cautiously.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the cookie name to use</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre>java.lang.String getName()</pre> |
| <div class="block">Gets the name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired. |
| |
| <p> |
| By default, <tt>JSESSIONID</tt> will be used as the cookie name.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie name set via <a href="../../javax/servlet/SessionCookieConfig.html#setName-java.lang.String-"><code>setName(java.lang.String)</code></a>, or <tt>null</tt> if <a href="../../javax/servlet/SessionCookieConfig.html#setName-java.lang.String-"><code>setName(java.lang.String)</code></a> was never called</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#getName--"><code>Cookie.getName()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setDomain-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDomain</h4> |
| <pre>void setDomain(java.lang.String domain)</pre> |
| <div class="block">Sets the domain name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>domain</code> - the cookie domain to use</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#setDomain-java.lang.String-"><code>Cookie.setDomain(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDomain--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDomain</h4> |
| <pre>java.lang.String getDomain()</pre> |
| <div class="block">Gets the domain name that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie domain set via <a href="../../javax/servlet/SessionCookieConfig.html#setDomain-java.lang.String-"><code>setDomain(java.lang.String)</code></a>, or <tt>null</tt> if <a href="../../javax/servlet/SessionCookieConfig.html#setDomain-java.lang.String-"><code>setDomain(java.lang.String)</code></a> was never called</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#getDomain--"><code>Cookie.getDomain()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPath-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPath</h4> |
| <pre>void setPath(java.lang.String path)</pre> |
| <div class="block">Sets the path that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>path</code> - the cookie path to use</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#setPath-java.lang.String-"><code>Cookie.setPath(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getPath--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPath</h4> |
| <pre>java.lang.String getPath()</pre> |
| <div class="block">Gets the path that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired. |
| |
| <p> |
| By default, the context path of the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired will be used.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie path set via <a href="../../javax/servlet/SessionCookieConfig.html#setPath-java.lang.String-"><code>setPath(java.lang.String)</code></a>, or <tt>null</tt> if <a href="../../javax/servlet/SessionCookieConfig.html#setPath-java.lang.String-"><code>setPath(java.lang.String)</code></a> was never called</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#getPath--"><code>Cookie.getPath()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setComment-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setComment</h4> |
| <pre>void setComment(java.lang.String comment)</pre> |
| <div class="block">Sets the comment that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired. |
| |
| <p> |
| As a side effect of this call, the session tracking cookies will be marked with a <code>Version</code> attribute |
| equal to <code>1</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>comment</code> - the cookie comment to use</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#setComment-java.lang.String-"><code>Cookie.setComment(String)</code></a>, |
| <a href="../../javax/servlet/http/Cookie.html#getVersion--"><code>Cookie.getVersion()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getComment--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getComment</h4> |
| <pre>java.lang.String getComment()</pre> |
| <div class="block">Gets the comment that will be assigned to any session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie comment set via <a href="../../javax/servlet/SessionCookieConfig.html#setComment-java.lang.String-"><code>setComment(java.lang.String)</code></a>, or <tt>null</tt> if <a href="../../javax/servlet/SessionCookieConfig.html#setComment-java.lang.String-"><code>setComment(java.lang.String)</code></a> was never called</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#getComment--"><code>Cookie.getComment()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setHttpOnly-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setHttpOnly</h4> |
| <pre>void setHttpOnly(boolean httpOnly)</pre> |
| <div class="block">Marks or unmarks the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired as <i>HttpOnly</i>. |
| |
| <p> |
| A cookie is marked as <tt>HttpOnly</tt> by adding the <tt>HttpOnly</tt> attribute to it. <i>HttpOnly</i> cookies |
| are not supposed to be exposed to client-side scripting code, and may therefore help mitigate certain kinds of |
| cross-site scripting attacks.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>httpOnly</code> - true if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired shall be marked |
| as <i>HttpOnly</i>, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#setHttpOnly-boolean-"><code>Cookie.setHttpOnly(boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isHttpOnly--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isHttpOnly</h4> |
| <pre>boolean isHttpOnly()</pre> |
| <div class="block">Checks if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired will be marked as |
| <i>HttpOnly</i>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired will be marked as |
| <i>HttpOnly</i>, false otherwise</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#isHttpOnly--"><code>Cookie.isHttpOnly()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setSecure-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSecure</h4> |
| <pre>void setSecure(boolean secure)</pre> |
| <div class="block">Marks or unmarks the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired as <i>secure</i>. |
| |
| <p> |
| One use case for marking a session tracking cookie as <tt>secure</tt>, even though the request that initiated the |
| session came over HTTP, is to support a topology where the web container is front-ended by an SSL offloading load |
| balancer. In this case, the traffic between the client and the load balancer will be over HTTPS, whereas the |
| traffic between the load balancer and the web container will be over HTTP.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>secure</code> - true if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired shall be marked |
| as <i>secure</i> even if the request that initiated the corresponding session is using plain HTTP |
| instead of HTTPS, and false if they shall be marked as <i>secure</i> only if the request that |
| initiated the corresponding session was also secure</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#setSecure-boolean-"><code>Cookie.setSecure(boolean)</code></a>, |
| <a href="../../javax/servlet/ServletRequest.html#isSecure--"><code>ServletRequest.isSecure()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSecure--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSecure</h4> |
| <pre>boolean isSecure()</pre> |
| <div class="block">Checks if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired will be marked as <i>secure</i> |
| even if the request that initiated the corresponding session is using plain HTTP instead of HTTPS.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the session tracking cookies created on behalf of the application represented by the |
| <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired will be marked as |
| <i>secure</i> even if the request that initiated the corresponding session is using plain HTTP instead of |
| HTTPS, and false if they will be marked as <i>secure</i> only if the request that initiated the |
| corresponding session was also secure</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#getSecure--"><code>Cookie.getSecure()</code></a>, |
| <a href="../../javax/servlet/ServletRequest.html#isSecure--"><code>ServletRequest.isSecure()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setMaxAge-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxAge</h4> |
| <pre>void setMaxAge(int maxAge)</pre> |
| <div class="block">Sets the lifetime (in seconds) for the session tracking cookies created on behalf of the application represented |
| by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxAge</code> - the lifetime (in seconds) of the session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was |
| acquired has already been initialized</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#setMaxAge-int-"><code>Cookie.setMaxAge(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxAge--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getMaxAge</h4> |
| <pre>int getMaxAge()</pre> |
| <div class="block">Gets the lifetime (in seconds) of the session tracking cookies created on behalf of the application represented |
| by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired. |
| |
| <p> |
| By default, <tt>-1</tt> is returned.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the lifetime (in seconds) of the session tracking cookies created on behalf of the application |
| represented by the <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt> was acquired, or |
| <tt>-1</tt> (the default)</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/servlet/http/Cookie.html#getMaxAge--"><code>Cookie.getMaxAge()</code></a></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/ServletSecurityElement.html" title="class in javax.servlet"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/servlet/SessionTrackingMode.html" title="enum in javax.servlet"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/servlet/SessionCookieConfig.html" target="_top">Frames</a></li> |
| <li><a href="SessionCookieConfig.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>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |