Description
This issue is demonstrated in the attached quickstart.
Consider a stateless page that contains a form. When the user loads this page, a servlet session does not yet exist.
Now, in the onSubmit() of the form, call Session.get().bind(). This forces a servlet session to be created. The response to the form submission will thus contain a session cookie, and if a redirect is performed the URL will be rewritten to include a jsessionid.
A problem occurs when a redirect to the home page is performed in this scenario. Wicket responds with a Location header that looks like this:
Location: http://localhost:8080;jsessionid=cck8jr4b1vdtd5h7a17qv9bn
If I'm not mistaken this is an invalid URL. There should be a forward-slash between 8080 and ;jsessionid.
Safari on the Mac reports the following error:
"Safari can't open the page "http://localhost:8080;jsessionid=cck8jr4b1vdtd5h7a17qv9bn/" because Safari can't connect to the server "localhost".
If you then press the reload button in Safari, the error changes to:
"Safari can't open the page "http://localhost:8080;jsessionid=cck8jr4b1vdtd5h7a17qv9bn/" because the page's address isn't valid."
Other browsers, like Firefox 5.0, seem to automatically correct Wicket's mistake and do not report an error.