Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1176

async form submission creates a new session every time when cookies are disabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.1
    • 5.2
    • None
    • None
    • windows, tomcat 6

    Description

      If cookies are disabled on a server, tapestry fails to continue an existing session when a form is submitted via ajax. a new session is created every time the form is submitted.

      The following example works fine (session id does not change) when cookies are enabled for the webapp container, but does not work (new session id every submit) when cookies are disabled.

      public class Start
      {
      private final static Logger LOG = Logger.getLogger(Start.class);
      @Inject
      private ComponentResources resources;
      @Inject
      @Property
      private HttpServletRequest httpRequest;

      Object onSuccessFromMyForm()

      { LOG.debug(httpRequest.getSession().getId()); return new MultiZoneUpdate("myZone", resources.getEmbeddedComponent("myZone")); }

      }

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns="tapestry:parameter">
      <head>
      </head>
      <body>
      <t:form t:id="myForm" t:zone="myZone">
      <input type="submit" />
      </t:form>
      <t:zone t:id="myZone">
      ${httpRequest.session.id}
      </t:zone>
      </body>
      </html>

      Attachments

        Activity

          People

            ccordenier Christophe Cordenier
            paul.stanton Paul Stanton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: