Wicket seems to produce an empty redirect if a user already opened the home page of an app and gets redirected to the same page by e.g. clicking a link containing the following line:
In my case the purpose of the link is to sign out and redirect all users to a well known page afterwards. Involved URLs:
In this case Wicket creates an empty target URL for a redirect and sends that to my Tomcat 7, which seem to just forward it to the browser, which does nothing. The result is that the user sits on a white page and needs to refresh manually using e.g. F5. In contrast with a qucikstart containing and embedded Jetty, Wicket generates the exact same empty target URL but Jetty seem to resolve it internally to a absolut URL and therefore the requests succeeds now.
Example from the browser using Tomcat 7:
And from Jetty:
Debugging lead to org.apache.wicket.protocol.http.servlet.ServletWebResponse#encodeRedirectURL and #sendRedirect:
This function behaves (nearly) the same for my URLs, the only difference is the following line:
In my Tomcat I get a completely empty object, NOT null though, in the quickstart with Jetty I get an object containing ".". But in the end that doesn't seem to make any difference, both requests go through the following:
encodedUrl is "./" using Tomcat and Jetty as well, while "fullUrl" contains an absolute URL in both cases:
"./" is returned to ServletWebResponse.sendRedirect and runs into the following:
And that empties my URL and forwards it to the servlet container, where Jetty instead of Tomcat seems to provide some magic to respond with an absolute URL in the end. But my debugger says that in both cases
gets called with an empty string.