Wicket
  1. Wicket
  2. WICKET-1387

Cookie Path of persistent FormElements wrong

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.2
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      eclipse, maven, jetty-plugin / resin

      Description

      My web-app runs on the context-path "/mdb-war-wicket"

      the JSESSIONID cookie is set correctly by jetty:
      Name JSESSIONID
      Value rz0z72x33e4p
      Host localhost
      Path /mdb-war-wicket
      Secure No
      Expires At End Of Session

      But the persistent cookies of my form are set to Path "/":
      Name signInPanel:signInForm:username
      Value mdb
      Host localhost
      Path /
      Secure No
      Expires Sun, 30 Mar 2008 16:31:00 GMT

      This can be a real problem when more than one application runs in the app-server.

        Activity

        Hide
        Johan Compagner added a comment -

        we just had setPath("/")
        because previously we did getWebRequest().getContext())

        But that method is gone now. But the problem is can we really do this:

        cookie.setPath(getWebRequest().getHttpServletRequest().getContextPath());

        if we are behind a firewall?

        I committed that for now, but i guess we should look for better ways to do it
        I guess the Application.getXXXSetting().getContextPath() does have to return that people can configure correctly
        for this kind of stuff and also for creating full urls (for generating urls for emails and so on)

        Show
        Johan Compagner added a comment - we just had setPath("/") because previously we did getWebRequest().getContext()) But that method is gone now. But the problem is can we really do this: cookie.setPath(getWebRequest().getHttpServletRequest().getContextPath()); if we are behind a firewall? I committed that for now, but i guess we should look for better ways to do it I guess the Application.getXXXSetting().getContextPath() does have to return that people can configure correctly for this kind of stuff and also for creating full urls (for generating urls for emails and so on)

          People

          • Assignee:
            Alastair Maw
            Reporter:
            Daniel Peters
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development