Hi! I'm implementing multi-tab browser support for Wicket by automatically assigning a separate session to each tab on the server side. The cookie Path attribute ensures that each tab gets its own session, and the same scheme also works for JSESSIONID URL rewriting. The server manages the paths in a "lazy" manner (if path is not in url and is needed, client is redirected to a request with a new available path prefix).
Since this requires modifying WicketServlet and tweaking the servlet ContextPath ✂️, I can't seem to be able to use WicketTester directly for testing it, since that bypasses the servlet layer. What would be the best approach and/or a working example for JUnit testing Wicket in such a manner that requests go through WicketServlet? I'm asking because I'm thinking surely the Wicket project has automated tests for its core servlet components? But I searched the git repository and could not find any. Perhaps there is a best practices way to set up an embedded Jetty instance in @BeforeAll for the particular JUnit tests? I did ask chatgpt and it simply sort of did the Start.java in the set-up and invoked stop at teardown, but I'm second guessing since I could not find any examples of it in the wicket git repo. Comments/guidelines/suggestions would be appreciated ... Related discussion: https://stackoverflow.com/questions/17335418/create-and-maintain-different-cookies-for-different-tab-in-the-same-browser ** Martin