Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

how to get the dispatcher url in pages

Avatar

Level 3
Please let me know as how can I get the dispatcher URL in the code and use the same in author and Publish instance.
 
In the Author instance showing the port number in the view source is fine.
 
But in Publish instance it must just display only the dispacther URL should not show the exact URL and port numb er
 

I have a dispatcher url as:-

 
http://www-qa.com/content/campaigns/website/en_US/page.html
 
 
In my code jsp I have added
 
String hostname= "http://"+ slingRequest.getServerName()+":"+slingRequest.getServerPort();
 
so when I add the code for images in the src I am adding SRC as src="<%= hostname %>/etc/designs/dsm/img/bottom-border.gif"  as mentioned below
 
 
<img src="<%= hostname %>/etc/designs/dsm/img/bottom-border.gif" width="640" height="33" />
 
 
 
So this add the actual cq server instead we want just the Dispatcher URL how could I achieve it
1 Accepted Solution

Avatar

Correct answer by
Level 8
3 Replies

Avatar

Correct answer by
Level 8

Avatar

Level 8

Perhaps you need to configure a URL transformer, as described here: http://docs.adobe.com/docs/en/dispatcher/disp-domains.html#Rewriting%20Links%20to%20Non-HTML%20Files...

scott

Avatar

Level 3

Thanks this solved the issue