<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Absolute content path from short URL in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391557#M9596</link>
    <description>&lt;P&gt;&lt;LI-USER uid="17377751"&gt;&lt;/LI-USER&gt;&amp;nbsp;You can use reverse mapping to get the actual content path.&lt;BR /&gt;resourceResolver.resolve() - This will give the resource with actual path and using the getPath() on this resource you can get the full path of the resource.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resource resource = resourceResolver.resolve("shortpath");&lt;BR /&gt;String fullPath = resource.getPath();&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 11:00:42 GMT</pubDate>
    <dc:creator>Asutosh_Jena_</dc:creator>
    <dc:date>2020-12-21T11:00:42Z</dc:date>
    <item>
      <title>Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391537#M9594</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using etc mapping to shorten the URL's, We have a servlet where we will pass shortened URL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Param = "/en/testPage.html"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there any way i can get absolute content path in java given short URL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excepted output : "/content/mywebsite/en/testPage.html"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ay input helps, Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 08:54:35 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391537#M9594</guid>
      <dc:creator>vinodprathipati</dc:creator>
      <dc:date>2020-12-21T08:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391542#M9595</link>
      <description>&lt;P&gt;You can get the reference to a resource from a shortened absolute path. The API method for that is resolve() which does a reverse mapping of path to resource -&amp;nbsp;&lt;A href="https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/javadoc/org/apache/sling/api/resource/ResourceResolver.html#resolve-java.lang.String-" target="_blank"&gt;https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/javadoc/org/apache/sling/api/resource/ResourceResolver.html#resolve-java.lang.String-&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After you get reference to a resource, you can call resource.getPath() to get the full path of the resource in repository.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For examples see this thread-&amp;nbsp;&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/21105300/cq5-how-to-programmatically-find-out-the-resource-given-a-url" target="_blank"&gt;https://stackoverflow.com/questions/21105300/cq5-how-to-programmatically-find-out-the-resource-given-a-url&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:37:02 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391542#M9595</guid>
      <dc:creator>kunal23</dc:creator>
      <dc:date>2020-12-21T09:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391557#M9596</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17377751"&gt;&lt;/LI-USER&gt;&amp;nbsp;You can use reverse mapping to get the actual content path.&lt;BR /&gt;resourceResolver.resolve() - This will give the resource with actual path and using the getPath() on this resource you can get the full path of the resource.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resource resource = resourceResolver.resolve("shortpath");&lt;BR /&gt;String fullPath = resource.getPath();&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 11:00:42 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391557#M9596</guid>
      <dc:creator>Asutosh_Jena_</dc:creator>
      <dc:date>2020-12-21T11:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391570#M9597</link>
      <description>&lt;P&gt;i tried it but fullPath is not coming up.&lt;/P&gt;&lt;P&gt;path = "/en/test.html";&lt;/P&gt;&lt;P&gt;String url = request.getParameter(PATH);&lt;BR /&gt;Resource resource = request.getResourceResolver().resolve(url);&lt;BR /&gt;String fullPath = resource.getPath();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am getting fullPath as&amp;nbsp;/en/test.html, let me know if i am missing something. etec mapping were already in place for publishers.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 13:07:52 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391570#M9597</guid>
      <dc:creator>vinodprathipati</dc:creator>
      <dc:date>2020-12-21T13:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391572#M9598</link>
      <description>Hi Kunal, i tried it but fullPath is not coming up. path = "/en/test.html"; String url = request.getParameter(PATH); Resource resource = request.getResourceResolver().resolve(url); String fullPath = resource.getPath(); i am getting fullPath as&amp;nbsp;/en/test.html, let me know if i am missing something. etec mapping were already in place for publishers.</description>
      <pubDate>Mon, 21 Dec 2020 13:08:45 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391572#M9598</guid>
      <dc:creator>vinodprathipati</dc:creator>
      <dc:date>2020-12-21T13:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391588#M9599</link>
      <description>You can first test the resolve function in resource resolver mapping testing console. Open this url - http://localhost:4502/system/console/jcrresolver, put "/en/test.html" in the text box and click on resolve button. If you don't see a mapped resource listed then the API method will not work. You will have to check your resolver mapping configurations and validate them.</description>
      <pubDate>Mon, 21 Dec 2020 14:21:20 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391588#M9599</guid>
      <dc:creator>kunal23</dc:creator>
      <dc:date>2020-12-21T14:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391595#M9600</link>
      <description>&lt;P&gt;With a servlet, you can do something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&lt;LI-USER uid="3214626" login="reference"&gt;&lt;/LI-USER&gt;
private ResourceResolver resourceResolver;

...
String mappedPath = resourceResolver.map("/content/mywebsite/en/testPage");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html" target="_blank" rel="noopener"&gt;https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html&lt;/A&gt;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="3"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN class=""&gt;&lt;A href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#map-java.lang.String-" target="_blank" rel="noopener"&gt;map&lt;/A&gt;&lt;/SPAN&gt;(&lt;A title="class or interface in java.lang" href="http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html?is-external=true" target="_blank" rel="noopener"&gt;String&lt;/A&gt;&amp;nbsp;resourcePath)&lt;DIV class=""&gt;Returns a path mapped from the (resource) path applying the reverse mapping used by the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#resolve-java.lang.String-" target="_blank" rel="noopener"&gt;resolve(String)&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;such that when the path is given to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#resolve-java.lang.String-" target="_blank" rel="noopener"&gt;resolve(String)&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method the same resource is returned.&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 21 Dec 2020 15:21:39 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391595#M9600</guid>
      <dc:creator>BrianKasingli</dc:creator>
      <dc:date>2020-12-21T15:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391596#M9601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17377751"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try following steps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Access&amp;nbsp;Resource Resolver console&amp;nbsp;&lt;A href="http://localhost:4502/system/console/jcrresolver" target="_blank" rel="noopener"&gt;http://localhost:4502/system/console/jcrresolver&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;To get absolute path using relative/shorten url: add shorten url &amp;amp; click on resolve.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.test.com/en/testPage.html" target="_blank" rel="noopener"&gt;https://www.test.com&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;A href="https://www.test.com/en/testPage.html" target="_blank" rel="noopener"&gt;/en/testPage&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;/content/mywebsite/en/testPage&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;//make sure you are passing complete path with domain name as per your etc mapping. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;same value you can get in backend using &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;resourceResolver.resolve("&lt;STRONG&gt;&lt;A href="https://www.test.com/en/testPage.html" target="_blank" rel="noopener"&gt;https://www.test.com/en/testPage&lt;/A&gt;&lt;/STRONG&gt;") //returns&amp;nbsp;&lt;STRONG&gt;/content/mywebsite/en/testPage&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;To get relative/shorten url using absolute path: add complete path &amp;amp; click on map.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;/content/mywebsite/en/testPage&lt;/STRONG&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://www.test.com/en/testPage.html" target="_blank" rel="noopener"&gt;https://www.test.com/en/testPage&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;same value you can get in backend using &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;resourceResolver.map("&lt;STRONG&gt;/content/mywebsite/en/testPage&lt;/STRONG&gt;") //returns &lt;STRONG&gt;&lt;A href="https://www.test.com/en/testPage" target="_blank" rel="noopener"&gt;https://www.test.com/en/testPage&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:48:03 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391596#M9601</guid>
      <dc:creator>Manjunath_K</dc:creator>
      <dc:date>2020-12-21T17:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391622#M9603</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i checked in jcrresolver and i am able to resolve my path and getting full content path.&lt;/P&gt;&lt;P&gt;for e.g."https://mydomain/en/test.html" is resolving into "/content/global/eb/test.html"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But from java i am not able to resolve URL properly(in servlet)&lt;/P&gt;&lt;P&gt;"request.getResourceResolver.resolve(&lt;A href="https://mydomain/en/test.html).getPath(" target="_blank"&gt;https://mydomain/en/test.html).getPath(&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;" is giving output as "&lt;A href="https://mydomain/en/test.html).getPath(" target="_blank"&gt;https://mydomain/en/test.html&lt;/A&gt;" instead of "/content/global/eb/test.html", Please let me know if i am missing anything. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 18:24:53 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391622#M9603</guid>
      <dc:creator>vinodprathipati</dc:creator>
      <dc:date>2020-12-21T18:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391624#M9605</link>
      <description>Hi, i checked in jcrresolver and i am able to resolve my path and getting full content path. for e.g."https://mydomain/en/test.html" is resolving into "/content/global/eb/test.html" But from java i am not able to resolve URL properly(in servlet) "request.getResourceResolver.resolve(https://mydomain/en/test.html).getPath() " is giving output as "https://mydomain/en/test.html" instead of "/content/global/eb/test.html", Please let me know if i am missing anything. Thanks</description>
      <pubDate>Mon, 21 Dec 2020 18:30:57 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391624#M9605</guid>
      <dc:creator>vinodprathipati</dc:creator>
      <dc:date>2020-12-21T18:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get Absolute content path from short URL</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391720#M9607</link>
      <description>what are your configuration the etc mappings?</description>
      <pubDate>Tue, 22 Dec 2020 14:31:44 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/get-absolute-content-path-from-short-url/m-p/391720#M9607</guid>
      <dc:creator>BrianKasingli</dc:creator>
      <dc:date>2020-12-22T14:31:44Z</dc:date>
    </item>
  </channel>
</rss>

