cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying the login screen on session time out.

Former Member
0 Kudos

Dear SDN Community,

I have developed and deployed a Web dynpro for java application. I would like to show the user the login screen when the session gets timed out and user trying to access the other views of the application. Can you please advice me how I can achieve this.

Thanks!

Surya.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi V.,

have a look at the [SAP API Docs for WebDynpro|https://help.sap.com/javadocs/NW04S/current/index.html] and the class WDClientUser. The method forceLogoffClientUser(String url) does what you need.

Web Dynpro redirects to the specified URL. If the specified URL is null, the redirect is done to the "LogoffURL" URL that can be specified in the application properties. If this URL is also not defined, a redirect to a Web Dynpro internal logoff page is done.

regards,

Christian

Former Member
0 Kudos

Christian,

Thanks for your reply. My question is how do I come to know that my session is expired. Which exception should I catch to know that the session got expired. There is one method, which does the same

WDSessionExpiredException

But this is deprecated. Can you please advice me how I can catch the session expiration in my code.

Thanks!

Surya.

Answers (1)

Answers (1)

former_member182374
Active Contributor
0 Kudos

Hi,

See /thread/552523 [original link is broken] (the redirection part)

Omri

Former Member
0 Kudos

Omri,

Thanks for your reply. But the solution that you have suggested involves the portal framework and javascript. In a pure Webdynpro for java application the Portal framewok and javascript are not supported. If you think of a solution which is using WebDynpro API is appreciated.

Thanks!

Vivek.