Disable Jetty’s session cookies

This remediates the exception “Shared scheduler not started” and restores the functionality of enabling an app in apps.properties – see #103 (comment)
This commit is contained in:
Tobi Schäfer 2025-04-07 01:06:09 +02:00
parent 99e8b204fd
commit 2994a4becc
Signed by: tobi
GPG key ID: 91FAE6FE2EBAC4C8

View file

@ -502,7 +502,9 @@ public class ApplicationManager implements XmlRpcHandler {
staticContext.start(); staticContext.start();
} }
appContext = new ServletContextHandler(ServletContextHandler.SESSIONS); // I hope I am correct assuming Helma does not need Jettys session management, but using
// `ServletContextHandler.SESSIONS` causes an exception: Shared scheduler not started
appContext = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
appContext.setContextPath(pathPattern); appContext.setContextPath(pathPattern);
context.addHandler(appContext); context.addHandler(appContext);
@ -544,9 +546,7 @@ public class ApplicationManager implements XmlRpcHandler {
// Remap the context paths and start // Remap the context paths and start
ApplicationManager.this.context.mapContexts(); ApplicationManager.this.context.mapContexts();
// FIXME: Causing java.lang.IllegalStateException: Shared scheduler not started this.appContext.start();
// Is it necessary, anway?
//this.appContext.start();
} }
// register as XML-RPC handler // register as XML-RPC handler