2 Replies Latest reply on Jan 26, 2010 7:19 AM by jbhannes

    Store cookies in JBoss Portal

      Hi all,

       

      I use JBossAS 4.2.3 and JBossPortal 2.7.

       

      I want to store a cookie via RenderResponse.addProperty(). But no cookie will be send to client side (browser).

      Does JBoss Portal require to use the following code?

       

      <container-runtime-option>
          <name>javax.portlet.renderHeaders</name>
          <value>true</value>
      </container-runtime-option>

       

      Or does another solution exist here?

       

      Thanks in advance.

        • 1. Re: Store cookies in JBoss Portal
          Did u try with the method:
          addProperty(javax.servlet.http.Cookie cookie)
          • 2. Re: Store cookies in JBoss Portal
            Yes, I tried the method
            addProperty(javax.servlet.http.Cookie cookie).

             

            But on client side (in the browser), no cookie was set. As mentioned in the JavaDoc of this method, there is no guarantee that the cookie is made to the client.


                /**
                 * Adds a HTTP Cookie property to the response.<br>
                 * The portlet should note that the cookie may not make
                 * it to the client, but may be stored at the portal.
                 */