The `javax.servlet.http.Cookie.getMaxAge` method returns the maximum age of the cookie in seconds. The maximum age represents the period of time for which the cookie will be stored on the client's computer before being automatically removed. The value returned by this method is based on the `Max-Age` attribute of the cookie, which is typically set by the server when creating the cookie. A positive value indicates that the cookie will persist for the specified number of seconds, while a negative value means the cookie will be removed as soon as the browser session ends. If the `Max-Age` attribute is not set, this method will return -1, indicating that the cookie will persist until explicitly removed by the client.
Java Cookie.getMaxAge - 18 examples found. These are the top rated real world Java examples of javax.servlet.http.Cookie.getMaxAge extracted from open source projects. You can rate examples to help us improve the quality of examples.