Get dispatcher url from code
Hi Team
I want to get dispatcher url so that I can perfrom url splitting and get titles.
Currently when I try with below I am getting author /content urls even on publisher and dispatcher getting /content urls.
Hi Team
I want to get dispatcher url so that I can perfrom url splitting and get titles.
Currently when I try with below I am getting author /content urls even on publisher and dispatcher getting /content urls.
Hi @prashardan, You need to configure Resource Mapping (/etc/map) for your website first. Then use the following Java code for Dispatcher URL:
String contentPath = getCurrentPage().getPath();
String mappedURL = getResourceResolver().map(contentPath); // Dispatcher URL
In Page Properties, 3 options are available. Please choose the method based on your requirement.

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.