cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing page when using session_single_frame.htm & Unique session-id

Former Member
0 Kudos

Hi,

I have 2 issues:

1)I am using session_single_frame.htm to cleanup sessions.The problem is that when I navigate to another url by using navigation->goto_page('XXX') in the target_url if the page, then the url of the browser still remains to be the same. This is becuase of the fact that I am using framsets. Then when I refresh the browser the control comes back to the target_url that I had defined in the session_single_frame.htm. is there a way we can control this? i.e the url of the target_page should dynamically change to second url of the page.

2) If I Copy and paste the url of the browser into another IE session the previous session-id is used. is there a way to control that i.e distinguish every window with a unique session-id? once you have 2 windows using same session-id then I run into problem with cookie data being overlayed with each other.

Would Appreciate any help in this regard

A

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member181879
Active Contributor
0 Kudos

I think that here two problems are been mixed.

The first is session ids. These are stored in cookies with a specific application path. This is why it is not possible to run the same BSP application twice in the same instance. Anything window.open or File->newWindow is same instance. If you require to run multiple instances of the same app, only technique would be via sap-syscmd=nocookie.

The problem (2) described by Ashish is relatively complex. You will need to make HTTP proxy traces and really understand how cookies work before we can explain this. Problem is that the session management that should close first the one session before starting a new one is relatively slow. We have now found a workaround which seems to be good. Should I find time in the near future I will write it up. However, this is no promise! Time is very scarce.

What is possible is to run two windows, both actually running the same BSP application. As long as the applications stores no state at the server, all in fine. Especially if one uses serverside cookies to store state. Now it is only required to keep the two instances separated. This is something that the developer must do. When you do a window.open() add an new random instance number onto the URL. This number must be rendered in each HTTP response as hidden input field, so that one knows which window is calling.

Doing the same for file-->newWindow is similar, slightly more complex. Use a frameset with no windowNr. Inside frameset load frame with windowNr in URL. This way all requests from this current window (from frame) has a windowNr. When control-N is pressed, the frameset URL without the windowNr is used to start the new window. When we see a new request at the server without a windowNr, we assign one and setup again the frameset for this window.

Unfortunately this topic is relatively complex, and not something one can describe in the scope of one page. It will need a lot more careful writing.

++bcm

Claudia_Dangers
Advisor
Advisor
0 Kudos

Hi Colleagues,

I'm picking up topic 2 of Ashish, which has not been answered. Hopefully I'll get an answer, because I'm running into the same problem, now.

I save cookie A on page 1 and then open page 2 in a popup (with javascript) where I save cookie B.

When I start my bsp application, the first run is always fine. But if I open the popup the second time, cookie A is not there. It seems to be overwritten by cookie B, although cookie B has another name.

Any ideas?

thanks a lot in advance,

Claudia

Former Member
0 Kudos

Hello,

the problem is well know to me - especially in stateful applications. If you open a browser via CTTL+N or via JS window.open a child instance of the browser will be generated and it will inherit all the cookie information.

If you open a new browser via a exe-file( start->programs->MS IE e.g.) this wont' be happen. Then you have to independent instances.

Regards, Bernd

Claudia_Dangers
Advisor
Advisor
0 Kudos

Hi Bernd,

thanks for your answer. Can you tell me how to open a new instance of a browser with javascript?

thanks a lot, Claudia

Former Member
0 Kudos

Hi Claudia,

sorry - actually not. What you coud do instead create your own guid with FM create_guid and set/get this guid as client cookie and make your own "session management" based on this guid.

So you can avoid at least the access to the same data, I suppose.

Regards, Bernd

former_member181879
Active Contributor
0 Kudos

> thanks for your answer. Can you tell me how to open a

> new instance of a browser with javascript?

Not possible. Only window.open which gives more windows on same instance.

++bcm