Issue while getting URI of a CAF page

Hi All,

The CAF portal is migrated from 9.5 to 10.5. Portlets have the logic to check the URI of the page and do an action.We are using PortalServlet.getCurrentRequest().getRequestURI()) method to get URI(alias) of the page.
One of the portlets has an issue. It is not returning the page URI properly. I kept a log statement in the beforeRenderResponse method, the page is getting refreshed twice and printing the following lines.

2020-08-30 17:38:39 AEST (c.g.a.p.c.g.p.p.ProposalDefaultviewView:INFO) [qtp170727614-108][ [RID:1090]] [ [RID:1090]] - ************* I am at beforeRenderResponse method *************
2020-08-30 17:38:39 AEST (c.g.a.p.c.g.p.p.ProposalDefaultviewView:INFO) [qtp170727614-108][ [RID:1090]] [ [RID:1090]] - URI from Proposal page /GnwAu.UnderwritingProposalDetail 2020-08-30 17:38:39 AEST
2020-08-30 17:38:40 AEST (c.g.a.p.c.g.p.p.ProposalDefaultviewView:INFO) [qtp170727614-109][ [RID:1091]] [ [RID:1091]] - ************* I am at beforeRenderResponse method *************
2020-08-30 17:38:40 AEST (c.g.a.p.c.g.p.p.ProposalDefaultviewView:INFO) [qtp170727614-109][ [RID:1091]] [ [RID:1091]] - URI from Proposal page /gnwautaskassessproposal/portletcontainer-servlet

Does the method return that URI properly all the time?
Your suggestions are appreciated. Thanks in advance.

Regards,
Mohan Nataraj