{"id":19817625,"url":"https://github.com/appng/appng-tomcat-session","last_synced_at":"2026-04-28T16:38:56.315Z","repository":{"id":38686725,"uuid":"99141245","full_name":"appNG/appng-tomcat-session","owner":"appNG","description":"Support for stateless appNG nodes by storing the user session in an external session store.","archived":false,"fork":false,"pushed_at":"2023-06-16T12:58:15.000Z","size":276,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-28T19:57:07.010Z","etag":null,"topics":["clustering","jedis","mongodb","redis","tomcat"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appNG.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.adoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-02T16:57:10.000Z","updated_at":"2023-05-10T14:59:32.000Z","dependencies_parsed_at":"2025-01-11T08:11:18.618Z","dependency_job_id":"16f405aa-8c02-4c17-9afb-818dfdbcdfe8","html_url":"https://github.com/appNG/appng-tomcat-session","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/appNG/appng-tomcat-session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appNG%2Fappng-tomcat-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appNG%2Fappng-tomcat-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appNG%2Fappng-tomcat-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appNG%2Fappng-tomcat-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appNG","download_url":"https://codeload.github.com/appNG/appng-tomcat-session/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appNG%2Fappng-tomcat-session/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286004346,"owners_count":27269140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering","jedis","mongodb","redis","tomcat"],"created_at":"2024-11-12T10:13:11.349Z","updated_at":"2025-11-23T19:04:17.223Z","avatar_url":"https://github.com/appNG.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"image::https://raw.githubusercontent.com/appNG/appng/master/appng-logo.png[]\n\n:version: 0.3.0-SNAPSHOT\n:mongo-version: 3.12.8\n:jedis-version: 4.2.3\n:pool2-version: 2.11.1\n:hazelcast-version: 5.1.2\n\n== appNG Tomcat Session\nThis library contains implementations of http://tomcat.apache.org/[Apache Tomcat^]s \nhttps://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/catalina/Manager.html[org.apache.catalina.Manager^] \nusing https://redis.io/[Redis^], \nhttps://hazelcast.org[Hazelcast^]\nand https://www.mongodb.com[MongoDB^].\n\n== Prerequisites\nBy default, Tomcats uses it's own logging component named JULI, writing logfiles to `CATALINA_HOME/logs`.\n\nHowever, if you want to see some logging in the `appNG.log` of your appNG installation, *move* the following files from `APPNG_HOME/WEB-INF/lib` into the `CATALINA_HOME/lib` directory:\n\n* log4j-1.2.17.jar\n* slf4j-api-1.7.25.jar\n* slf4j-log4j12-1.7.25.jar\n\nNext, set the category for `org.appng.tomcat.session` in `APPNG_HOME/WEB-INF/conf/log4j.properties` to the required level:\n[source,plain]\n----\nlog4j.category.org.appng.tomcat.session = trace\n----\n\n== Using Redis\nThis implementation uses https://redis.io/[Redis^] to store sessions.\nIt is based on the great work of James Coleman's https://github.com/jcoleman/tomcat-redis-session-manager[tomcat-redis-session-manager^].\n\nA few changes were made to support Tomcat 8 and the latest version of Redis.\n\n=== Configuration\nAdd the following into your Tomcat `context.xml` (or the context block of the `server.xml` if applicable.)\n\n[source,xml]\n----\n\u003cValve className=\"org.appng.tomcat.session.redis.RedisSessionHandlerValve\" /\u003e\n\u003cManager className=\"org.appng.tomcat.session.redis.RedisSessionManager\"\n    host=\"localhost\"\n    port=\"6379\"\n    database=\"0\"\n    maxInactiveInterval=\"60\"\n    sessionPersistPolicies=\"ALWAYS_SAVE_AFTER_REQUEST\" /\u003e\n----\n\nCopy the following files into the `TOMCAT_BASE/lib` directory:\n\n* appng-tomcat-session-{version}.jar\n* http://repo1.maven.org/maven2/redis/clients/jedis/{jedis-version}/jedis-{jedis-version}.jar[jedis-{jedis-version}.jar^]\n* http://repo1.maven.org/maven2/org/apache/commons/commons-pool2/{pool2-version}/commons-pool2-{pool2-version}.jar[commons-pool2-{pool2-version}.jar^]\n\nReboot the server, and sessions should now be stored in Redis.\n\n\n== Using MongoDB\nThis implementation uses https://www.mongodb.com[MongoDB^] to store sessions.\n\n=== Configuration\nAdd the following into your Tomcat `context.xml` (or the context block of the `server.xml` if applicable.)\n\n[source,xml]\n----\n\u003cValve className=\"org.appng.tomcat.session.mongo.MongoSessionTrackerValve\" /\u003e\n\u003cManager className=\"org.appng.tomcat.session.mongo.MongoPersistentManager\" maxIdleBackup=\"30\"\u003e\n\t\u003cStore className=\"org.appng.tomcat.session.mongo.MongoStore\"\n\t\thosts=\"localhost:27017\"\n\t\tdbName=\"tomcat_sessions\"\n\t\tmaxPoolSize=\"25\"\n\t/\u003e\n\u003c/Manager\u003e\n----\n\nCopy the following files into the `TOMCAT_BASE/lib` directory:\n\n* appng-tomcat-session-{version}.jar\n* http://repo1.maven.org/maven2/org/mongodb/mongo-java-driver/{mongo-version}/mongo-java-driver-{mongo-version}.jar[mongo-java-driver-{mongo-version}.jar^]\n\nReboot the server, and sessions should now be stored in MongoDB.\n\n\n== Using Hazelcast\nThe implementation is based on  https://hazelcast.org[Hazelcast^], \nusing an https://docs.hazelcast.org/docs/{hazelcast-version}/javadoc/com/hazelcast/map/IMap.html[IMap].\n\n=== Configuration\nAdd the following into your Tomcat `context.xml` (or the context block of the `server.xml` if applicable.)\n\n[source,xml]\n----\n\u003c?xml version='1.0' encoding='utf-8'?\u003e\n\u003cContext\u003e\n\t\u003cValve   className=\"org.appng.tomcat.session.hazelcast.HazelcastSessionTrackerValve\" /\u003e\n\t\u003c!-- configFile must use a path from classpath --\u003e\n\t\u003cManager className=\"org.appng.tomcat.session.hazelcast.HazelcastManager\" configFile=\"hazelcast.xml\" /\u003e\n\u003c/Context\u003e\n----\n\nCopy the following files into the `TOMCAT_BASE/lib` directory:\n\n* appng-tomcat-session-{version}.jar\n* http://repo1.maven.org/maven2/com/hazelcast/hazelcast/{hazelcast-version}/hazelcast-{hazelcast-version}.jar[hazelcast-{hazelcast-version}.jar]\n\nReboot the server, and sessions are now stored in Hazelcast.\n\n== License\nappNG is licensed under the https://www.apache.org/licenses/LICENSE-2.0[Apache License 2.0^].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappng%2Fappng-tomcat-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappng%2Fappng-tomcat-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappng%2Fappng-tomcat-session/lists"}