Changing session management settings in the HCL Commerce configuration file (wc-server.xml)

You can change various session management settings in the HCL Commerce configuration file. For example, if you set the expiration time you can change the tracking behavior of the referral cookie. The referral cookie is used for marketing activities, to track the URL that referred the customer to the HCL Commerce site. That is, it tracks the URL that was displayed in the customer's browser immediately before navigating to the HCL Commerce site.

Procedure

  1. Open the configuration file.
  2. Search for the <SessionManagement> block. For example,
    <SessionManagement>
       <url-rewriting
          display="false" enabled="false"/>
       <cookie
          acceptance="false"
          age="-1"
          display="false"
          domain=""
          enabled="true"
          path="/" persistence="wcs"/>
       <referrerCookie
          age="-1"/>
       <PersistentSession
          cookieExpiry="30"
          delayNewPersistentGuestSession="true"
          display="false" enable="true"/>
       <PersonalizationId
          display="false" enable="true"/>
    </SessionManagement>
    
    where:
    URL-rewriting
    For more information, see Enabling or disabling URL rewriting for session management.
    cookie
    See Enabling cookies for session management
    referrerCookie
    age
    (Integer) The age value is in seconds. If the value specified is invalid, the default value is used. The default value is -1.
    The possible values are:
    • A positive value, indicating that the cookie expires after the specified number of seconds have passed. The value represents the maximum age for the cookie to expire, not the cookie's current age.
      Note: Setting the value to 1209600 indicates that the cookie expires after two weeks, maintaining its previous default behavior in HCL Commerce.
    • A negative value, indicating that the cookie is not stored persistently and will be deleted when the Web browser exits.
    • A value of 0, indicating that the cookie will be deleted.
    PersistentSession
    cookieExpiry
    The number of days until the cookie expires.
    cookieExpiryGuest
    The number of days until a cookie for a guest user expires. By default, the guest cookie is not defined, and cookieExpiry is used for both registered and guest users. By defining cookieExpiryGuest, the parameter is restricted to guest users, and the guest user receives a different expiry date than a registered user.
    delayNewPersistentGuestSession
    Used to delay creating a guest session for a "remember me" user. By default, this parameter is enabled (true) and a new guest session is not created until an action cannot be performed as a partially authenticated user.
    enable
    Whether persistent sessions are enabled.
    For more information, see Persistent sessions (Remember Me)
    PersonalizationId
    For more information, see Enabling personalization ID.
  3. Edit the values as appropriate.
  4. Save and exit the configuration file.
  5. Restart the Transaction server and the Store server in order for your changes to take effect.

What to do next

Package your changes to the HCL Commerce configuration file for deployment.