blob: 420bb546d9d6c82f6cf9a637f69d43267e122088 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter&nbsp;36.&nbsp;Upgrading Jetty</title><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><meta name="keywords" content="jetty, servlet, servlet-api, cometd, http, websocket, eclipse, maven, java, server, software"><link rel="home" href="index.html" title="Jetty"><link rel="up" href="jetty-ref-guide.html" title="Part&nbsp;V.&nbsp;Jetty Reference Guide"><link rel="prev" href="release-testing.html" title="Testing a Jetty Release"><link xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" rel="shortcut icon" href="images/favicon.ico"><link rel="stylesheet" href="css/highlighter/foundation.css"><script src="js/highlight.pack.js"></script><script>
hljs.initHighlightingOnLoad();
</script><link type="text/css" rel="stylesheet" href="css/font-awesome/font-awesome.min.css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><tr><td style="width: 25%"><a href="http://www.eclipse.org/jetty"><img src="images/jetty-header-logo.png" alt="Jetty Logo"></a><br><span style="font-size: small">
Version: 9.4.28-SNAPSHOT</span></td><td style="width: 50%"></td></tr></table><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;36.&nbsp;Upgrading Jetty</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="release-testing.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;V.&nbsp;Jetty Reference Guide<br><a accesskey="p" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></th><td width="20%" align="right">&nbsp;</td></tr></table><hr></div><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="jetty-callout"><h5 class="callout"><a href="http://www.webtide.com/">Contact the core Jetty developers at
<span class="website">www.webtide.com</span></a></h5><p>
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ...
scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development
</p></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="upgrading-jetty"></a>Chapter&nbsp;36.&nbsp;Upgrading Jetty</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="upgrading-jetty.html#_upgrading_from_jetty_9_3_x_to_jetty_9_4_0">Upgrading from Jetty 9.3.x to Jetty 9.4.0</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_upgrading_from_jetty_9_3_x_to_jetty_9_4_0"></a>Upgrading from Jetty 9.3.x to Jetty 9.4.0</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="upgrading-jetty.html#_the_jetty_sh_script">The jetty.sh Script</a></span></dt><dt><span class="section"><a href="upgrading-jetty.html#_removed_classes">Removed Classes</a></span></dt><dt><span class="section"><a href="upgrading-jetty.html#_module_changes_in_jetty_9_4">Module Changes in Jetty 9.4</a></span></dt><dt><span class="section"><a href="upgrading-jetty.html#_session_management">Session Management</a></span></dt><dt><span class="section"><a href="upgrading-jetty.html#_servletcontainerinitializers">ServletContainerInitializers</a></span></dt></dl></div><p>The purpose of this guide is to assist users migrating from Jetty 9.3.x to 9.4.0.
It is not comprehensive, but covers many of the major changes included in the release that may prove as problem areas for users.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_the_jetty_sh_script"></a>The jetty.sh Script</h3></div></div></div><p>The file <code class="literal">jetty.sh</code>, typically used to start Jetty as a service in Linux/Unix machines underwent only small changes, such as the addition of <a class="link" href="https://wiki.debian.org/LSBInitScripts" target="_top">LSB tags</a>.</p><p>You can safely replace the <code class="literal">jetty.sh</code> file packaged with Jetty 9.3 with the version found in Jetty 9.4.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_removed_classes"></a>Removed Classes</h3></div></div></div><p><code class="literal">ConcurrentArrayQueue</code> was removed from use in Jetty 9.3 and the class has been removed entirely as part of Jetty 9.4.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_module_changes_in_jetty_9_4"></a>Module Changes in Jetty 9.4</h3></div></div></div><div class="informaltable"><table class="informaltable" border="1"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">Jetty 9.3 Module</th><th align="left" valign="top">Jetty 9.4 Module</th></tr></thead><tbody><tr><td align="left" valign="top"><p><code class="literal">logging</code></p></td><td align="left" valign="top"><p><code class="literal">console-capture</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">infinispan</code></p></td><td align="left" valign="top"><p><code class="literal">session-store-infinispan-embedded</code> or <code class="literal">session-store-infinispan-remote</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">jdbc-sessions</code></p></td><td align="left" valign="top"><p><code class="literal">session-store-jdbc</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">gcloud-memcached-sessions</code>, <code class="literal">gcloud-session-idmgr</code> and <code class="literal">gcloud-sessions</code></p></td><td align="left" valign="top"><p><code class="literal">session-store-gcloud</code> and <code class="literal">session-store-cache</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">nosql</code></p></td><td align="left" valign="top"><p><code class="literal">session-store-mongo</code></p></td></tr></tbody></table></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_logging_modules"></a>Logging Modules</h4></div></div></div><p>The module <code class="literal">logging</code> is no longer available in Jetty 9.4.</p><p>The logging module structure present in Jetty 9.3 has been replaced with a more fine-grained structure in Jetty 9.4, so that you have now more choices available that are also easier to configure.</p><p>The migration path is different depending on whether you have completely customized this module or not.</p><p>If you have a Jetty 9.3 installation, and you have both <code class="literal">$jetty.base/modules/logging.mod</code> and <code class="literal">$jetty.base/etc/jetty-logging.xml</code>, then this module is local to your <code class="literal">$jetty.base</code> setup and will be used by Jetty 9.4 as before.
No changes are required for your implementation.</p><p>If either <code class="literal">$jetty.base/modules/logging.mod</code> or <code class="literal">$jetty.base/etc/jetty-logging.xml</code> are missing, then you were relying on those present in <code class="literal">$jetty.home</code>, which were present in Jetty 9.3, but are no longer available in Jetty 9.4.</p><p>The Jetty 9.3 <code class="literal">logging</code> module has been renamed to <code class="literal">console-capture</code> in Jetty 9.4.
You need to open your Jetty 9.3 <code class="literal">start.ini</code> and replace the references to the <code class="literal">logging</code> modules with <code class="literal">console-capture</code>.</p><p>For example, in an existing Jetty 9.3 <code class="literal">start.ini</code> file the module declaration for logging would look like this:</p><div class="screenexample"><pre class="screen">--module=logging
jetty.logging.retainDays=7</pre></div><p>In 9.4, it should be replaced by:</p><div class="screenexample"><pre class="screen">--module=console-capture
jetty.console-capture.retainDays=7</pre></div><p>The properties that may be present in your Jetty 9.3&#8217;s <code class="literal">start.ini</code>, such as <code class="literal">jetty.logging.retainDays</code> will still be working in Jetty 9.4, but a warning will be printed at Jetty 9.4 startup, saying to replace them with correspondent <code class="literal">jetty.console-capture.*</code> properties such as <code class="literal">jetty.console-capture.retainDays</code>.</p><p>For information on logging modules in the Jetty 9.4 architecture please see the section on <a class="link" href="configuring-logging-modules.html" title="Jetty Logging Integrations (SLF4J, Log4j, Logback, JCL, JUL)">configuring logging modules.</a></p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_session_management"></a>Session Management</h3></div></div></div><p>Session management received a significant overhaul in Jetty 9.4.
Session functionality has been refactored to promote code-reuse, easier configuration and easier customization.
Whereas previously users needed to edit xml configuration files, in Jetty 9.4 all session behavior is controlled by properties that are exposed by the various session modules.
Users now configure session management by selecting a composition of session modules.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_change_overview"></a>Change Overview</h4></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">SessionIdManager</span></dt><dd>Previously there was a different class of SessionIdManager - with different configuration options - depending upon which type of clustering technology chosen.
In Jetty 9.4, there is only one type, the <a class="link" href="http://www.eclipse.org/jetty/javadoc/9.4.28-SNAPSHOT/org/eclipse/jetty/server/session/DefaultSessionIdManager.html" target="_top">org.eclipse.jetty.server.session.DefaultSessionIdManager</a>.</dd><dt><span class="term">SessionManager</span></dt><dd><p class="simpara">Previously, there was a different class of SessionManager depending upon which the type of clustering technology chosen.
In Jetty 9.4 we have removed the SessionManager class and split its functionality into different, more easily extensible and composable classes:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">General setters</span></dt><dd>All of the common setup of sessions such as the maxInactiveInterval and session cookie-related configuration has been moved to the <a class="link" href="http://www.eclipse.org/jetty/javadoc/9.4.28-SNAPSHOT/org/eclipse/jetty/server/session/SessionHandler.html" target="_top">org.eclipse.jetty.server.session.SessionHandler</a></dd></dl></div></dd></dl></div><div class="informaltable"><table class="informaltable" border="1"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">9.3 SessionManager</th><th align="left" valign="top">9.4 SessionHandler</th></tr></thead><tbody><tr><td align="left" valign="top"><p><code class="literal">setMaxInactiveInterval(sec)</code></p></td><td align="left" valign="top"><p><code class="literal">setMaxInactiveInterval(sec)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setSessionCookie(String)</code></p></td><td align="left" valign="top"><p><code class="literal">setSessionCookie(String)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setRefreshCookieAge(sec)</code></p></td><td align="left" valign="top"><p><code class="literal">setRefreshCookieAge(sec)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setSecureRequestOnly(boolean)</code></p></td><td align="left" valign="top"><p><code class="literal">setSecureRequestOnly(boolean)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setSessionIdPathParameterName(String)</code></p></td><td align="left" valign="top"><p><code class="literal">setSessionIdPathParameterName(String)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setSessionTrackingModes(Set&lt;SessionTrackingMode&gt;)</code></p></td><td align="left" valign="top"><p><code class="literal">setSessionTrackingModes(Set&lt;SessionTrackingMode&gt;)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setHttpOnly(boolean)</code></p></td><td align="left" valign="top"><p><code class="literal">setHttpOnly(boolean)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setUsingCookies(boolean)</code></p></td><td align="left" valign="top"><p><code class="literal">setUsingCookies(boolean)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">setCheckingRemoteSessionIdEncoding(boolean)</code></p></td><td align="left" valign="top"><p><code class="literal">setCheckingRemoteSessionIdEncoding(boolean)</code></p></td></tr></tbody></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">Persistence</span></dt><dd>In Jetty 9.3 <code class="literal">SessionManagers</code> (and sometimes <code class="literal">SessionIdManagers</code>) implemented the persistence mechanism.
In Jetty 9.4 we have moved this functionality into the <a class="link" href="http://www.eclipse.org/jetty/javadoc/9.4.28-SNAPSHOT/org/eclipse/jetty/server/session/SessionDataStore.html" target="_top"><code class="literal">org.eclipse.jetty.server.session.SessionDataStore</code></a>.</dd><dt><span class="term">Session cache</span></dt><dd>In Jetty 9.3 the <code class="literal">SessionManager</code> held a map of session objects in memory.
In Jetty 9.4 this has been moved into the new <a class="link" href="http://www.eclipse.org/jetty/javadoc/9.4.28-SNAPSHOT/org/eclipse/jetty/server/session/SessionCache.html" target="_top"><code class="literal">org.eclipse.jetty.server.session.SessionCache</code></a> interface.</dd></dl></div><p>For more information, please refer to the documentation on <a class="link" href="session-management.html#jetty-sessions-architecture" title="Session Architecture">Jetty Session Architecture.</a></p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_default_sessions"></a>Default Sessions</h4></div></div></div><p>As with earlier versions of Jetty, if you do not explicitly configure any session modules, the default session infrastructure will be enabled.
In previous versions of Jetty this was referred to as "hash" session management.
The new default provides similar features to the old hash session management:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">A session scavenger thread that runs every 10mins and removes expired sessions</li><li class="listitem">A session id manager that generates unique session ids and handles session id sharing during context forwarding</li><li class="listitem">An in-memory cache of session objects.</li></ul></div><p>Requests for the same session in the same context share the same session object.
Session objects remain in the cache until they expire or are explicitly invalidated.</p><p>If you wish to configure the default setup further, enable the <code class="literal">session-cache-hash</code> module.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>As Session objects do not persist beyond a server restart, there are no compatibility issues.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_sessions_using_the_filesystem"></a>Sessions using the Filesystem</h4></div></div></div><p>In earlier versions of Jetty, persisting sessions to the local filesystem was an option of the "hash" session manager.
In Jetty 9.4 this has been refactored to its own configurable module <code class="literal">session-store-file</code>.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>Sessions stored to files by earlier versions of jetty are not compatible with jetty-9.4 sessions.
Here is a comparison of file formats, note that the file contents are listed in order of file output:</p><div class="informaltable"><table class="informaltable" border="1"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">Jetty 9.3</th><th align="left" valign="top">Jetty 9.4</th></tr></thead><tbody><tr><td align="left" valign="top"><p>File name: <code class="literal">sessionid</code></p></td><td align="left" valign="top"><p>File name: <code class="literal">expirytime_contextpath_vhost_sessionid</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">sessionid (utf)</code></p></td><td align="left" valign="top"><p><code class="literal">sessionid (utf)</code></p></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p><code class="literal">contextpath (utf)</code></p></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p><code class="literal">vhost (utf)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">nodeid (utf)</code></p></td><td align="left" valign="top"><p><code class="literal">lastnode (utf)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">createtime (long)</code></p></td><td align="left" valign="top"><p><code class="literal">createtime (long)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">accessed (long)</code></p></td><td align="left" valign="top"><p><code class="literal">accessed (long)</code></p></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p><code class="literal">lastaccessed (long)</code></p></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p><code class="literal">cookiesettime (long)</code></p></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p><code class="literal">expiry (long)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">requests (int)</code></p></td><td align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p><code class="literal">maxInactive (long)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">attributes size (int)</code></p></td><td align="left" valign="top"><p><code class="literal">attributes size (int)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">attributes serialized (obj)</code></p></td><td align="left" valign="top"><p><code class="literal">attributes serialized (obj)</code></p></td></tr><tr><td align="left" valign="top"><p><code class="literal">maxInactive (long)</code></p></td><td align="left" valign="top">&nbsp;</td></tr></tbody></table></div><div class="blockquote"><blockquote class="blockquote"><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-asterisk" aria-hidden="true"></i> Note</h3><p>Session data is now only loaded when requested.
Previous functionality such as <code class="literal">setLazyLoad</code> has been removed.</p></div></blockquote></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_jdbc_sessions"></a>JDBC Sessions</h4></div></div></div><p>As with earlier versions of Jetty, sessions may be persisted to a relational database.
Enable the <code class="literal">session-store-jdbc</code> module.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>Sessions stored to the database by earlier versions of jetty are not compatible with jetty-9.4 sessions.
The incompatibility is minor: in jetty-9.4 the <code class="literal">rowid</code> primary key column is no longer used, and the primary key is a composite of <code class="literal">(sessionid,contextpath,vhost)</code> columns.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_nosql_sessions"></a>NoSQL Sessions</h4></div></div></div><p>As with earlier versions of Jetty, sessions may be persisted to a document database.
Jetty supports the Mongo document database.
Enable the <code class="literal">session-store-mongo</code> module.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>Sessions stored to mongo by earlier versions of jetty are not compatible with jetty-9.4 sessions.
The key for each subdocument that represents the session information for a context is different between jetty-9.3 and 9.4:</p><div class="informaltable"><table class="informaltable" border="1"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">Jetty 9.3</th><th align="left" valign="top">Jetty 9.4</th></tr></thead><tbody><tr><td align="left" valign="top"><p>Each context key is: vhost+context+path, where empty vhosts="::" and root context = "*" and / is replaced by _</p></td><td align="left" valign="top"><p>Each context key is: vhost:contextpath, where empty vhosts="0_0_0_0" and root context = "" and / replaced by _</p></td></tr><tr><td align="left" valign="top"><p>eg "::/contextA"</p></td><td align="left" valign="top"><p>eg " 0_0_0_0:_contextA"</p></td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_infinispan_sessions"></a>Infinispan Sessions</h4></div></div></div><p>As with earlier versions of Jetty, sessions may be clustered via Infinispan to either an in-process or remote infinispan instance.
Enable the <code class="literal">session-store-infinispan</code> module.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>Sessions stored in infinispan by jetty-9.3 are incompatible with jetty-9.4.
In Jetty 9.3 the serialized object stored to represent the session data was <code class="literal">org.eclipse.jetty.session.infinispan.SerializableSessionData</code>.
In Jetty 9.4 the serialized object is <code class="literal">org.eclipse.jetty.serer.session.SessionData</code>.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_gcloud_datastore"></a>GCloud Datastore</h4></div></div></div><p>As with earlier versions of Jetty, sessions may be persisted to Google&#8217;s GCloud Datastore.
Enable the <code class="literal">session-store-gcloud</code> module.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>Sessions stored into GCloud Datastore by Jetty 9.3 are <span class="strong"><strong>incompatible</strong></span> with Jetty 9.4, although the incompatibility is trivial: the name of the session id entity property has changed:</p><div class="informaltable"><table class="informaltable" border="1"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">Jetty 9.3</th><th align="left" valign="top">Jetty 9.4</th></tr></thead><tbody><tr><td align="left" valign="top"><p>Kind: <code class="literal">GCloudSession</code></p></td><td align="left" valign="top"><p>Kind: <code class="literal">GCloudSession</code></p></td></tr><tr><td align="left" valign="top"><p>key: <code class="literal">contextpath_vhost_sessionid</code></p></td><td align="left" valign="top"><p>key: <code class="literal">contextpath_vhost_sessionid</code></p></td></tr><tr><td align="left" valign="top"><p><span class="strong"><strong>"clusterId"</strong></span>: <code class="literal">sessionId</code></p></td><td align="left" valign="top"><p><span class="strong"><strong>"id"</strong></span>: <code class="literal">sessionId</code></p></td></tr><tr><td align="left" valign="top"><p>"contextPath" : <code class="literal">contextpath</code></p></td><td align="left" valign="top"><p>"contextPath": <code class="literal">contextpath</code></p></td></tr><tr><td align="left" valign="top"><p>"vhost" : <code class="literal">vhost</code></p></td><td align="left" valign="top"><p>"vhost": <code class="literal">vhost</code></p></td></tr><tr><td align="left" valign="top"><p>"accessed": <code class="literal">accesstime</code></p></td><td align="left" valign="top"><p>"accessed": <code class="literal">accesstime</code></p></td></tr><tr><td align="left" valign="top"><p>"lastAccessed": <code class="literal">lastaccesstime</code></p></td><td align="left" valign="top"><p>"lastAccessed": <code class="literal">lastaccesstime</code></p></td></tr><tr><td align="left" valign="top"><p>"createTime": <code class="literal">createtime</code></p></td><td align="left" valign="top"><p>"createTime": <code class="literal">createtime</code></p></td></tr><tr><td align="left" valign="top"><p>"cookieSetTime": <code class="literal">cookiesettime</code></p></td><td align="left" valign="top"><p>"cookieSetTime": <code class="literal">cookiesettime</code></p></td></tr><tr><td align="left" valign="top"><p>"lastNode": <code class="literal">lastnode</code></p></td><td align="left" valign="top"><p>"lastNode": <code class="literal">lastnode</code></p></td></tr><tr><td align="left" valign="top"><p>"expiry": <code class="literal">expiry</code></p></td><td align="left" valign="top"><p>"expiry": <code class="literal">expiry</code></p></td></tr><tr><td align="left" valign="top"><p>"maxInactive": <code class="literal">maxInactive</code></p></td><td align="left" valign="top"><p>"maxInactive": <code class="literal">maxInactive</code></p></td></tr><tr><td align="left" valign="top"><p>"attributes": <code class="literal">blob</code></p></td><td align="left" valign="top"><p>"attributes": <code class="literal">blob</code></p></td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_gcloud_datastore_with_memcached"></a>GCloud Datastore with Memcached</h4></div></div></div><p>As with earlier versions of Jetty, sessions can be both persisted to Google&#8217;s GCloud Datastore, and cached into Memcached for faster access.
Enable the <code class="literal">session-store-gcloud</code> and <code class="literal">session-store-cache</code> modules.</p><p><span class="strong"><strong>Compatibility</strong></span></p><p>Sessions stored into Memcached by earlier versions of jetty are incompatible with Jetty 9.4.
Previous versions of jetty stored <code class="literal">org.eclipse.jetty.gcloud.memcached.session.SerializableSessionData</code> whereas Jetty 9.4 stores <code class="literal">org.eclipse.jetty.server.session.SessionData</code>.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_servletcontainerinitializers"></a>ServletContainerInitializers</h3></div></div></div><p>As of Jetty-9.4.4, unless the <code class="literal">web.xml</code> is version 3.0 or greater, only <code class="literal">ServletContainerInitializers</code> that are on the container classpath will be discovered.
Users wishing to use <code class="literal">ServletContainerInitializers</code> from within the webapp with older versions of <code class="literal">web.xml</code> must either upgrade their <code class="literal">web.xml</code> version, or call <code class="literal">WebAppContext.setConfigurationDiscovered(true)</code> either programmatically or in xml.
Upgrading the <code class="literal">web.xml</code> version is preferable.</p></div></div></div><script type="text/javascript">
SyntaxHighlighter.all()
</script><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="release-testing.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="jetty-ref-guide.html"><i class="fa fa-chevron-up" aria-hidden="true"></i> Top</a></td><td width="40%" align="right">&nbsp;</td></tr><tr><td width="40%" align="left" valign="top">Testing a Jetty Release&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div><p xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><div class="jetty-callout">
See an error or something missing?
<span class="callout"><a href="http://github.com/eclipse/jetty.project">Contribute to this documentation at
<span class="website"><i class="fa fa-github" aria-hidden="true"></i> Github!</span></a></span><span style="float: right"><i>(Generated: 2020-03-10)</i></span></div></p></body></html>