Access HTTP Get Request Parameter

Hello,

I have build a user login confirmation screen. The confirmation screen should only be used by users, that have jumped on this screen by a generated link. So I created a page, set the Route(“confirm”) and I generate a link http:/someadresss/app/main/confirm?link=123456.

Within the screen I want to access the link request parameter, check it against the DB to validate if the link is correct. But I can’t get access to the request paramter. I tried RequestContext.get().getRequest().getParameter(“link”).

Best regards
Mike

Hi,
Have you tried to use UrlParamsChangedEvent ?

See description and code sample in docs:
https://doc.cuba-platform.com/manual-7.2/url_navigation_api_usage.html#using_urlParamsChangedEvent

1 Like

Thanks, works as expected. Sorry for my late reply, I had been switched to another task.