Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4550

jsessionid is not added to resources if cookies are disabled by the server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.5
    • 1.5.7, 6.0.0-beta3
    • wicket
    • None

    Description

      When I configure the container (either Jetty or Tomcat) to not support cookies, I expect the jsessionid to be added to all resource links in the page. However, with Wicket 1.5.5 this isn't the case, i.e. all URLs are lacking the jsessionid, both in development and deployment mode.

      Example IS:
      <script type="text/javascript" src="wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ver-1331911540000.js"></script>

      Example SHOULD:
      <script type="text/javascript" src="wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ver-1331911540000.js;jsessionid=${something}"></script>

      This creates a new session for each and every resource in the page, which is an undesirable behavior. I have found a few issues regarding this topic, e.g. WICKET-4334 and WICKET-4312, but none of them could give me a clue about why it doesn't work the way I expect it. In Wicket 1.4.x the jsessionid was added to all resource links, so everything worked fine and the current session was reused.

      I created a quickstart do demonstrate the behavior - please see the attached file. The file jetty-web.xml tells Jetty to not support cookies, so mvn jetty:run can be run without any further configuration.

      By the way, I found a suggestion to use a custom IResourceCachingStrategy to append the jsessionid (or whatever) to URLs of resources in the archive of the mailinglist. Unfortunately, this doesn't work because the URL is encoded afterwards and the ; is turned into %3B.

      Attachments

        1. jsessionid-quickstart.tar.gz
          19 kB
          Michael Bruns
        2. WICKET-4550.patch
          8 kB
          Martin Tzvetanov Grigorov

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              miggel Michael Bruns
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: