This is a simple example which demonstrates how to setup and use the Session Management Module for Tomcat.
This example assumes you have Geode and Java installed. It also assumes you have local copy of Tomcat Downloaded. It was designed and tested with Geode 1.9.0 and Tomcat 9, and while the session features will work with other combinations you may need to make some changes to the setup if you're using other versions. For more information about how to set up the tomcat module with your version of Tomcat and Geode see the official documentation at: https://geode.apache.org/docs/guide/19/tools_modules/http_session_mgmt/tomcat_installing_the_module.html
Set the environment Variable $CATALINA_HOME to point at the root directory of your local Tomcat installation. This is required by Tomcat, so in some cases this may have already been set.
Find the configuration files located at $CATALINA_HOME/conf/. To the server.xml file add the line:
and to the file context.xml add the line:
./example-setup.sh <root directory of Geode install>
Specify the root directory of your local Geode installation. Make sure you have no local Geode cluster running, as this step will start a new local cluster to manage our Session States. This can be done by running gfsh from your geode installation and running a connect command with no parameters. If a cluster is found, use the shutdown command to stop the cluster before continuting.