Skip to Content
author's profile photo Former Member
Former Member

[ Server Side Cookie ] Browser blocked all cookie.

Hi,

I use server side cookie to pass value between two pages.

But if I blocked all cookie in my broswer setting, and the server cookie doesn't work.

How could I pass value in this condition?

Thank you!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Dec 22, 2004 at 08:21 AM

    Hi Eason,

    that's not possible: client settings cannot block the server side cookie.

    Let's assume this coding in the OnInputprocessing at page A:

    username = sy-uname.

    TRANSLATE username TO LOWER CASE.

    • Store.

    cl_bsp_server_side_cookie=>set_server_cookie( name = 'SEARCH'

    application_name = runtime->application_name

    application_namespace = runtime->application_namespace

    username = username

    session_id = runtime->session_id

    data_name = 'FOUNDS'

    data_value = founds

    expiry_time_rel = '600' ).

    This defines a ssc (server side cookie).

    You can show cookies via report BSP_SHOW_SERVER_COOKIES.

    On page B (the successor of A) you can get the content via:

    CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie

    EXPORTING

    name = 'SEARCH'

    application_name = runtime->application_name

    application_namespace = runtime->application_namespace

    username = username

    session_id = runtime->session_id

    data_name = 'FOUNDS'

    CHANGING

    data_value = founds.

    Try this.

    Best regards,

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Eddy De Clercq

      Hi Eddy,

      Thank you a lot for your solution!!!~~~

      I use sy-uname as session_id in this condition, and the server side cookie works even if client browser block the cookie.

      Here is my code in Page-A and Page-B:

      <b>[Page-A]</b>

      cl_bsp_server_side_cookie=>set_server_cookie(

      EXPORTING

      name = 'MY_COOKIE'

      application_namespace = runtime->application_namespace

      application_name = runtime->application_name

      username = sy-uname

      session_id = sy-uname

      expiry_time_rel = '600'

      data_name = 'test'

      data_value = '20041222'

      ).

      <b>[Page-B]</b>

      data test_value type string.

      cl_bsp_server_side_cookie=>get_server_cookie(

      EXPORTING

      name = 'MY_COOKIE'

      application_namespace = runtime->application_namespace

      application_name = runtime->application_name

      username = sy-uname

      session_id = sy-uname

      data_name = 'test'

      CHANGING

      data_value = test_value

      ).

      cl_bsp_server_side_cookie=><b>delete_server_cookie</b>(

      EXPORTING

      name = 'MY_COOKIE'

      application_namespace = runtime->application_namespace

      application_name = runtime->application_name

      username = sy-uname

      session_id = sy-uname

      ).

      Thank you again.

      And Happy New Year!!!

      Regards,

      Eason

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2004 at 09:43 PM

    Hi Eason,

    Did the replies help? If so, don't forget to assign points. I gave them some, but feel free to increase them!

    See: /people/mark.finnern/blog/2004/08/10/spread-the-love for directions.

    Click on the Yellow Star icon in each reply.

    You can give:

    1 - 10 pointer (solves problem, marks as answered)

    2 - 6 pointers (very helpful)

    Lots of 2 pointers (helpful)

    Thanks!

    Linda (and Mark Finnern)

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.