Skip to content

Commit 29617f1

Browse files
committed
Wicket 10.5.0 and enlargement of Wickets pages store (file-based) to 2MB, was 100kB.
1 parent ae46539 commit 29617f1

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ org-apache-httpcomponents-core5 = "5.3.1" # Needed by httpclient5
4545
org-apache-jackrabbit-oak = "1.74.0"
4646
org-apache-poi = "5.3.0"
4747
org-apache-poi-ooxml = "5.3.0"
48-
org-apache-wicket-myextensions = "10.4.0"
49-
org-apache-wicket-spring = "10.4.0"
50-
org-apache-wicket-tester = "10.4.0"
51-
org-wicketstuff-html5 = "10.4.0"
52-
org-wicketstuff-select2 = "10.4.0"
48+
org-apache-wicket-myextensions = "10.5.0"
49+
org-apache-wicket-spring = "10.5.0"
50+
org-apache-wicket-tester = "10.5.0"
51+
org-wicketstuff-html5 = "10.5.0"
52+
org-wicketstuff-select2 = "10.5.0"
5353
org-apache-xmlgraphics-batik = "1.17"
5454
org-apache-xmlgraphics-fop = "2.10"
5555
org-apache-xmlgraphics-commons = "2.9"

projectforge-wicket/src/main/java/org/projectforge/web/wicket/WicketApplication.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,17 +336,13 @@ public void onRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler
336336

337337
getPageSettings().setRecreateBookmarkablePagesAfterExpiry(true);
338338
getPageSettings().setVersionPagesByDefault(true);
339-
/*setPageManagerProvider(() -> {
340-
IPageStore pageStore = new InMemoryPageStore(getName(), 20); // max. 10 Seiten pro Session
341-
return new PageStoreManager(this, new RequestPageStore(dataStore));
342-
// Alternatively, for storing pages on disk with a limit:
343-
// String storeFolder = getStoreFolder();
344-
// IDataStore diskDataStore = new DiskPageStore(storeFolder, 20); // Limit pages on disk
345-
// return new PageStoreManager(this, new RequestPageStore(diskDataStore));
346-
});*/
347-
getStoreSettings().setMaxSizePerSession(Bytes.kilobytes(100));
348-
log.info("Using file storage directory for page store: " + WebApplication.get().getServletContext()
349-
.getAttribute("jakarta.servlet.context.tempdir"));
339+
340+
// Configure standard Wicket settings to fix session-mixing issues after Wicket 10.4 migration
341+
342+
// These settings help with preserving page state and isolation between users
343+
getStoreSettings().setAsynchronous(false);
344+
getStoreSettings().setMaxSizePerSession(Bytes.megabytes(2));
345+
log.info("Using standard Wicket disk-based page store to fix session problems after Wicket 10 migration");
350346

351347
WicketSupport.register(SipgateDirectCallService.class, applicationContext.getBean(SipgateDirectCallService.class));
352348

0 commit comments

Comments
 (0)