cancel
Showing results for 
Search instead for 
Did you mean: 

ForceLogoffClientUser

Former Member
0 Kudos

..i want to open the logoff page of the portal after doing WDClientUser.forceLogoffClientUser(null)......

I have set it in the application properties but it redirects to a Web Dynpro internal logoff page......

Anybody??

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kanwalpreet,

Instead of <b>null</b> specify the url where you want to user to navigate after the user has logged off from the application.

WDClientUser.forceLogoffClientUser(http://www.google.com)//just an example

Warm Regards,

Murtuza

Former Member
0 Kudos

hi Murtuza

I have already tried that.....but it also opens up web dynpro internal logoff page.....i want to open my portal logon page after logging out....

Former Member
0 Kudos

Hi Kanwalpreet,

Use this url for your requirement:

WDClientUser.forceLogoffClientUser("/irj/portal?logout_submit=1");

Warm Regards,

Murtuza

Former Member
0 Kudos

Hi,

try the following:

In NW IDE open your application properties, and add standard property "log-off URL", for example "/useradmin/userAdminServlet?userProfileView";

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Murtuza

i have even tried that also...it directly logs me on witout asking 4 user name and pwd......i want my log on screen to open up........

Former Member
0 Kudos

Hi Kanwalpreet,

Have you created an iview for your webdynpro application and trying to execute it from portal or directly executing it locally giving url.

I have tried the same url in portal and when i clicked on the button it logged me off and redirected to the portal login page.

Warm Regards,

Murtuza

Former Member
0 Kudos

M tryin to execute it from the portal ....but its not workin.....

Former Member
0 Kudos

Hi Kanwalpreet,

Just give it a try:

WDClientUser.forceLogoffClientUser(null);

and provide the url /irj/portal?logout_submit=1 in the logoff url of your application properties.

Warm Regards,

Murtuza

Former Member
0 Kudos

Not workin this way also...

Former Member
0 Kudos

Hi Kanwalpreet,

you can try this code.

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

Thanks

Ninad

Former Member
0 Kudos

Hi Kanwalpreet,

It seems that the persitent cookies that it create while we log into the portal are not destroyed while you try to log off using the above method. You can redirect to a jsp page wherein you can write a code to delete the sso cookies and then redirect to the logon page.

Warm Regards,

Murtuza

Former Member
0 Kudos

i have got a logoff.jsp page....how 2 redirect to that page..that itself it is a problem,

/web/logoff.jsp....

Former Member
0 Kudos

Hi,

In your jsp first write the javascript to delete the sso cookies. Sorry, but I am not having the code snippet with me right now else would have shared with you. After that you can redirect it response.sendRedirect("http://<servername>:<port>/irj//portal?logout_submit=1");

Also, to redirect to your jsp page specify the url of your jsp page in the logoff url:

eg. http://<servername>:<port>/<webmodule>/logoff.jsp

Just try this if you might find luck.

Regards,

Murtuza

Former Member
0 Kudos

this z also not workin 4 me

Former Member
0 Kudos

Hi Kanwalpreet,

I am having the complete code for the jsp page to delete the cookies and redirect to the login page. Unfortunately, I could not find it today. I might share it once I find it.

Hope you find luck till then

Regards,

Murtuza

Former Member
0 Kudos

m usin this code 2 delete d cookies

function getCookie(NameOfCookie)

{ if (document.cookie.length > 0)

{ begin = document.cookie.indexOf(NameOfCookie+"=");

if (begin != -1)

{ begin = NameOfCookie.length1;

end = document.cookie.indexOf(";", begin);

if (end == -1) end = document.cookie.length;

return unescape(document.cookie.substring(begin, end));

}

return null;

}

function setCookie(NameOfCookie, value, expiredays)

{ var ExpireDate = new Date ();

ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

document.cookie = NameOfCookie + "=" + escape(value) +

((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

}

function delCookie (NameOfCookie)

{ if (getCookie(NameOfCookie)) {

document.cookie = NameOfCookie + "=" +

";

}

}