2 Replies Latest reply: May 9, 2007 11:46 PM by 807581 RSS

    can we change the name of the cookie - JSESSIONID?

    807581
      Can we change the name of the cookie- JSESSIONID?

      for eg.
      Set-Cookie = [ JSESSIONID=6ad8360e0d1af303293f26d98e2a; Version=1; Comment=Sun+ONE+Application+Server+Session+Tracking+Cookie; Path=/]

      can we change it to something like -
      Set-Cookie = [ ServletSession=RkA4OlbgfW; path=/]
        • 1. Re: can we change the name of the cookie - JSESSIONID?
          807581
          You should not change JSESSIONID - it is part of servlet spec and web applications should not mess with it.

          You should use your own cookies for your own special tracking purposes.
          • 2. Re: can we change the name of the cookie - JSESSIONID?
            807581
            Thankyou Sultal for the response.
            Actually we are migrating the application server from Weblogic5.1 to Sun application server 8.2. The client is a mobile client and it sends the Cookie as 'JSESSIONID=session_id_val&WeblogicSession=session_id_val' as parameters, not as request header.It worked fine for Weblogic5.1 but not in Sun Application Server.

            To make it clear :
            Weblogic           :     request.getsession(false) = sessionObj@value
            Sun Application Server      :     request.getsession(false) = null
            Sun Application Server      :     request.getParameter("JSESSIONID") = session_id_val

            In the Weblogic5.1 we have set the cookie & session parameters in the weblogic.properties file as:
            weblogic.httpd.session.cookies.enable=true
            weblogic.httpd.session.cookie.name=WebLogicSession
            weblogic.httpd.session.neverReadPostData=false
            weblogic.httpd.session.timeoutSecs=120

            In case of Sun application server , JSESSIONID is not coming as a cookie , request.getsession(false) is returning null value.Is there a way to initialize the session with JSESSIONID request parameter?