Wicket
  1. Wicket
  2. WICKET-4873

Support different session id parameter

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Jetty supports renaming the session id parameter by calling AbstractSessionManager#setSessionIdPathParameterName("sid"). Before 6.2.0 this wasn't a problem. But the changes introduced with WICKET-4816 now break this. Urls with /Page;sid=abc return 404 now. Technically it's not really required that Wicket provides a solution for this, because the name jsession id is mandated by the servlet spec, but it would be nice though.

        Activity

        Hide
        Martin Grigorov added a comment -

        The only management in Wicket related to jsessionid is in wicket-util's Strings#stripJsessionId().
        We can add :

        Strings.java:
        private static final String sessionId = System.getProperty("wicket.jsessionid", "jsessionid");

        And later use it in #stripJSessionId().
        This way you can set -Dwicket.jsessionid=sid in your start scripts.

        What do you think ?

        Show
        Martin Grigorov added a comment - The only management in Wicket related to jsessionid is in wicket-util's Strings#stripJsessionId(). We can add : Strings.java: private static final String sessionId = System.getProperty("wicket.jsessionid", "jsessionid"); And later use it in #stripJSessionId(). This way you can set -Dwicket.jsessionid=sid in your start scripts. What do you think ?
        Hide
        Christoph Leiter added a comment -

        I'm not in love with system properties, but I think it's the only feasible solution for now. It would definitely work for my use case. But maybe this could be an app setting for Wicket 7 when the stripJsessionId method can be moved into wicket-core.

        Show
        Christoph Leiter added a comment - I'm not in love with system properties, but I think it's the only feasible solution for now. It would definitely work for my use case. But maybe this could be an app setting for Wicket 7 when the stripJsessionId method can be moved into wicket-core.
        Hide
        flemming boller added a comment - - edited

        Hi

        as the #stripJSessionId() is called from within the WicketFilter, I would thing it is a good idea to open up for the possibility
        to specify the "new" jsessionid name in web.xml.

        Could it be done?

        Show
        flemming boller added a comment - - edited Hi as the #stripJSessionId() is called from within the WicketFilter, I would thing it is a good idea to open up for the possibility to specify the "new" jsessionid name in web.xml. Could it be done?

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Christoph Leiter
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development