Get previous Url

hi every one ,

i know this subject is opened many times in forum but i don’t find solution in posts !

In fact it’s written that the previus url is saved in the CwebUser.returnUrl property or CwebUser.getReturnUrl, but when i read the documentation of each one i found that those properties are working only with the login procedure.

i already tried to use them but nthing works, it just redirect me to the homepage.

Is there any method to get the previus page in the app ?

To get the previous page (if any) use - getRequestUri() -

Thanx but getRequestUri() return the current URI, i want to have the previus uri…

Right… Can this one help you… getUrlReferrer() -

Yes this is exactmy what i need ! thanx !! :)