cancel
Showing results for 
Search instead for 
Did you mean: 

[ Server Side Cookie ] Browser blocked all cookie.

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

RieSe
Contributor
0 Kudos

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

eddy_declercq
Active Contributor
0 Kudos

I would it rather strange too. Could you give some more details on brwoser (+version) and platform used?

Former Member
0 Kudos

Hi,

Thanks for your reply.

I use winXP professional SP1 and my browser is IE version 6.0.2800.1106.

My BSP application has two pages: Page-A and Page-B, when I select a item in dropdownListbox in Page-A, I want to pass value to Page-B and display it in a new window.

To do that, I use <b>set_server_cookie</b> in Page-A and <b>get_server_cookie</b> in Page-B.

After I trace in Page-A and Page-B, I found <b>session_id</b> different in two pages.

But when I do not block the cookies in client settings, the <b>session_id</b> are the same in two pages and I got the correct value.

Any idea?

Thank you.

<b>Page-A in OnInputProcessing:</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 = runtime->session_id

expiry_time_rel = '600'

data_name = 'test'

data_value = '20041222'

).

<b>Page-B in OnInitialization:</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 = runtime->session_id

data_name = 'test'

CHANGING

data_value = test_value

).

eddy_declercq
Active Contributor
0 Kudos

Hi,

I'm @home now, but I've found note 452051 indicating that there was something corrected in WAS 610 for cookieless clients.

I'm gonna try your code out tomorrow morning together with some of our code in order to see what happens.

Eddy

eddy_declercq
Active Contributor
0 Kudos

You're 100% right. I didn't use your code but ours and the session id changes when cookies are totally blocked and thus nothing is retrieved.

I would make an OSS msg of it if I were you. Or should I make one? Pls keep me in touch.

Former Member
0 Kudos

Hi,

Thank you for your reply.

I do not have an OSS.

Would you please make one for this.

regards,

Eason

eddy_declercq
Active Contributor
0 Kudos

OK, but you won't get any solution this year though. This is my last morning @work this year.

Happy holidays anyway.

Former Member
0 Kudos

Are you an SAP Customer? If so you can access the http://service.sap.com and start the message

eddy_declercq
Active Contributor
0 Kudos

I've sent an OSS anyway. I'm intreged by the problem anyway.

eddy_declercq
Active Contributor
0 Kudos

Our offices are closed till Jan 3th, but I had an answer from OSS. The said to apply note 762645 and 507621. The latter concerns 610 so I wonder if it makes sense to apply at all. The first one should be fixed also with 620 SP44 or 640 SP9. What version of WAS do you have and which SP level? I need to check ours next week.

I have some doubts though on this answer and wondering waht this has to do with blocked client cookies. I've put this doubt as a question to OSS.

eddy_declercq
Active Contributor
0 Kudos

Hi Eason,

I got a clarification from the OSS guys. This is what you need to according to them:

"Can you please do the following change:

change session_id = runtime->session_id to

session_id = 'static or session_id = sy-uname

This is because the session_id = runtime->session_id is at the moment a pseudo stable id in the cookie.

This problem shall be solved in the coming SP49."

Can you give it a try Eason? I would go for the sy-uname since the change is very little that a user will use two computers/sessions at the same time.

I'm @home (with my 17 months old daughter on my lap and my 5 year old son asking when he can play on the computer again). I'll give it a try next week.

If you didn't install SP44 yet, it won't hurt to do it anyway.

Happy holidays meanwhile.

Eddy

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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)