MCPcopy Create free account
hub / github.com/apache/tomcat / setMaxAge

Method setMaxAge

java/jakarta/servlet/http/Cookie.java:181–183  ·  view source on GitHub ↗

Sets the maximum age of the cookie in seconds. A positive value indicates that the cookie will expire after that many seconds have passed. Note that the value is the maximum age when the cookie will expire, not the cookie's current age. A negative value means that the cookie is not st

(int expiry)

Source from the content-addressed store, hash-verified

179 * @see #getMaxAge
180 */
181 public void setMaxAge(int expiry) {
182 setAttributeInternal(MAX_AGE, Integer.toString(expiry));
183 }
184
185
186 /**

Callers 9

doTestMaxAgeMethod · 0.95
testMaxAge01Method · 0.95
testCloneMethod · 0.95
invokeMethod · 0.95
invokeMethod · 0.95
createSessionCookieMethod · 0.95
registerMethod · 0.95
invokeMethod · 0.95
setAttributeMethod · 0.95

Calls 2

setAttributeInternalMethod · 0.95
toStringMethod · 0.65

Tested by 3

doTestMaxAgeMethod · 0.76
testMaxAge01Method · 0.76
testCloneMethod · 0.76