cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a SAP Portal LOG OFF functionality in a jsp

anandprakash_rai2
Participant
0 Kudos

Hi Experts,

I am working on SAP portal 7.31.

I am having a requirement where in when the portal sessions time out then the page should again get redirected to the SAP portal login page.

For this I have created a JSP in which I am redirecting to the SAP portal login page.

But the problem is-

Lets assume User A and User B.

User A has logged in to portal and his session is idle for some time. Then when User A again clicks  anywhere on the portal then the Session timeout takes place.Then our JSP is called which redirects back to the Portal Logon Page.

Now If we try to login into portal with User B credentials then logged in takes place successfully but still User B can see the User A data.

These data are coming from ECC.

Now if User A do the log off and then User B enters then all works perfectly fine.Here we are not calling any JSp. The user uses the Portal Log OFF.

Now my question is in my JSP can I call the same functionality of the Log OFF. If yes then how can I do that . Please guide me on this.

Any help will be really appreciated.

Regards,

Anand

Accepted Solutions (0)

Answers (1)

Answers (1)

govardan_raj
Contributor
0 Kudos

hi anand,

when time out occurs , how are you redirecting to the jsp ? , in mast head component we have standard java script logoff() functionality available , so as you have specified that time out occurs , during this time trigger a java script that calls logoff() function so the user is completely logged off.

Here im not able to understand , like when user A logs in and after time out , it is redirecting to jsp which inturn redirects to login page , here again when you give user B credentails , you are telling that data that is seen is actually Users A data ---? how can this happen , if you are redirecting to login page and if it is the same session , then im sure that after time out user A has been successfull logged out . hence you are redirected to the loginpage for entering the credentials. Inturn if the User A was not logged off and only redirection  has occured to your jsp and then to login page , with out giving any credentials it loggs in again as User A .

Time out part how are you handling  ?

Regards

Govardan

daniel_ruiz2
Active Contributor
0 Kudos

Hi Anand,

You kinda answered your question already: "These data are coming from ECC".

There must be some issue with the way JCO is dealing with the back-end, perhaps binding to the threadlocal itself - in addition, I'm not too sure why you want to cache information on ECC - seems to me you should be dealing with cache in the j2ee.

Last, you can reference component tc/je/usermanagement/api and execute a logoff or forceLogoffUser:


UMFactory.getLogonAuthenticator().logout(request, response);

or

UMFactory.getLogonAuthenticator().forceLogoffUser(request, response, (String)sendRedirectURL);

Hope it helps,

D.