cancel
Showing results for 
Search instead for 
Did you mean: 

Session variable not getting refreshed

Former Member
0 Kudos

Hi,

I am facing the following issue:

I have logged in with user id u2018User1u2019 on my machine and opened screen A in a new window. On page load, I get the IllumLoginName session variable as u2018User1u2019.

With this session and the screen A still open, if I log in with user id u2018User2u2019 on the same machine and open screen A in the same window, I still get the IllumLoginName session variable as u2018User1u2019 instead of u2018User2u2019 on page load.

If I close the first window and then open screen A in a new window, the session variable returns u2018User2u2019.

Can anybody help me out on this? Why is the session variable still referring to the previously-logged in user when the window remains open?

Thanks,

Amrita

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Amrita,

This is happening because of cache problem.

Pass refresh= 1 as session variable along with user id and call the below function body onload, in which page you are getting the session variable from previous page.

function getRefresh()

{

if( document.Appletname.getPropertyValue("refresh") == 1)

{

document.Appletname.setPropertyValue("refresh",0);

window.location.reload(true);

}

else

{

document.Appletname.setPropertyValue("refresh",1);

}

}

Hope this may work out.

Thanks,

Manisha

Former Member
0 Kudos

Hi Amrita,

Something similar happened in our project, we were capturing the user using the function: document.Applet.getUserName ().

found that the correct function is: document.Applet.getPropertyValue ( "IllumLoginName") and the problem was solved.

I hope it can help it.

Greetings,

Marcelo

Former Member
0 Kudos

Hi Marcelo,

I am using the same function:document.Applet.getPropertyValue ( "IllumLoginName"), but it returns the same value for both the sessions on page load when the screen is opened in the same window.

Thanks,

Amrita

jcgood25
Active Contributor
0 Kudos

Can you elaborate how you are logging out in order to log in as the 'new' user. And since security is entirely different, what version 11.5 or 12.0?

Edited by: Jeremy Good on May 30, 2008 7:30 AM

Former Member
0 Kudos

Hi Jeremy,

Both the users are logged in the same machine at the same time.

And we are currently using 11.5.

Thanks,

Amrita

Former Member
0 Kudos

I guess what Jeremy was asking is how do you log out, as in do you just close the browser of is there an explicit 'Logout' link?

I had a question , the statement -document.Applet.getPropertyValue ( "IllumLoginName"), do you use this in a function that you call on BODY load=""?.

Instead of this if you just want to display the name simply use instead of using any applet method and if you need the value for further use then declare a hidden input type whose value = "" and then use the value of the hidden variable for further manipulation.

Former Member
0 Kudos

Hi Udayan,

We normally logout using the 'Logout' link in the top right-hand corner of the window, but in this particular scenario, two users are logged in the same machine at the same time with both the user sessions active.

I have tried the method which you had suggested of using a hidden variable with the value set to , but it did not solve the problem. It still returns the username of the first user who has logged in, even in the second session. I am accessing this value in a script embedded in html.

Thanks,

Amrita

Edited by: Amrita Nandagopal on Jun 2, 2008 8:47 AM

Former Member
0 Kudos

Hi,

I guess this is bug in 11.5.One way to avoid this problem is to close the window on Logout.

I think this one helps.

Thanks

Ravi Kumar

Former Member
0 Kudos

Hi Amriita,

I feel that the statement <input type="hidden" id="loginName" value=""> should solve the problem as I have tested it just now and I am able to get different user names on the same machine.

Regards,

Musarrat

Former Member
0 Kudos

Hi Musarrat,

I tried doing the same, but it returned the first user's login name in both the sessions.

Did you try with both the users logged in or with the first user logged out? And also, we need to open the screen in the same window for both the users(so that two versions of the same screen do not exist on the same machine).

Thanks,

Amrita

agentry_src
Active Contributor
0 Kudos

Amrita,

Two possibilities come to mind. Java cache not clearing and Browser cache not clearing.

First test is while first screen is still open, go to Java Console (under Tools). X to clear cache. Then open second screen. See if it is correct.

Second test is to clear temporary files in Internet Options (also under Tools) and then open second screen. Depending on your version of IE (assuming you are using IE), you may want to change your options to 'Check for new versions everytime you visit the page'. It is a crude fix, but usually works.

Other than those two, you will need someone more technically oriented than myself.

Good luck!

Mike

Former Member
0 Kudos

Mike,

Tried both the options, but didn't seem to have any luck! Thanks anyway!

I think the only other option would be to close the already open window and open the screen again in a new window....

Thanks,

Amrita