cancel
Showing results for 
Search instead for 
Did you mean: 

Log off from web Dynpro application

Former Member
0 Kudos

Hi

I am using UME to authenticate the user in Dynpro application. and i want to provide he Log Off facility to log Off from the application so i have used the bellow line

WDClientUser.forceLogoffClientUser("URL OF THE APPLICATION");

to log off from the application but there i have to hard code the log off URL but if i don't want to hard code it how can i do that because if i moved the application from one server to another every time i have to rebuild the application.

so can any one help me out in this regards.

thanks

Ninad

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ninad,

you can use the following code to logoff the user and display the start page of your application again:


WDDeployableObjectPart d = wdComponentAPI.getApplication().getDeployableObjectPart();
String url = null;
try {
	url = WDURLGenerator.getApplicationURL(d);
} catch(WDURLException e) {
}
WDClientUser.forceLogoffClientUser(url);

Regards

Sebastian

Former Member
0 Kudos

Hi,

In NW IDE open your application properties, and add standard property "log-off URL" to some pre-defined value.

Then you can use this code:


WDClientUser.forceLogoffClientUser(null); 

You can use <i>null</i>. From the javadocs:

<i>url - the URL of the page that is shown to the user after logoff was done. If the parameter 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.</i>

Regards,

Satyajit.