Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

a

Avatar

Level 7

a

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The new versionHistory JSP can be found here - /libs/cq/gui/components/coral/common/admin/timeline/events/version/version.jsp

 

The preview button invokes com.day.cq.wcm.core.impl.servlets.VersionPreviewServlet in AEM. 

 

1673 TIMER_START{ResourceResolution}
   1882 TIMER_END{208,ResourceResolution} URI=/mnt/overlay/wcm/core/content/sites/versionhistory/_jcr_content.txt resolves to Resource=MergedResource [path=/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content, resources=[/libs/wcm/core/content/sites/versionhistory/jcr:content]]
   1886 LOG Resource Path Info: SlingRequestPathInfo: path='/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content', selectorString='null', extension='txt', suffix='null'
   1886 TIMER_START{ServletResolution}
   1888 TIMER_START{resolveServlet(/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content)}
   1899 TIMER_END{10,resolveServlet(/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content)} Using servlet com.day.cq.wcm.core.impl.servlets.VersionPreviewServlet
   1901 TIMER_END{14,ServletResolution} URI=/mnt/overlay/wcm/core/content/sites/versionhistory/_jcr_content.txt handled by Servlet=com.day.cq.wcm.core.impl.servlets.VersionPreviewServlet

The servlet is bound to resource type - cq/gui/components/common/admin/versionhistory 

If you have to invoke it via code then you need to make a POST call to following resource - /libs/wcm/core/content/sites/versionhistory/jcr:content 

Pass versionid in request body. 

The servlet will return you the temp path in AEM in response to preview the version. 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Employee Advisor

The new versionHistory JSP can be found here - /libs/cq/gui/components/coral/common/admin/timeline/events/version/version.jsp

 

The preview button invokes com.day.cq.wcm.core.impl.servlets.VersionPreviewServlet in AEM. 

 

1673 TIMER_START{ResourceResolution}
   1882 TIMER_END{208,ResourceResolution} URI=/mnt/overlay/wcm/core/content/sites/versionhistory/_jcr_content.txt resolves to Resource=MergedResource [path=/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content, resources=[/libs/wcm/core/content/sites/versionhistory/jcr:content]]
   1886 LOG Resource Path Info: SlingRequestPathInfo: path='/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content', selectorString='null', extension='txt', suffix='null'
   1886 TIMER_START{ServletResolution}
   1888 TIMER_START{resolveServlet(/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content)}
   1899 TIMER_END{10,resolveServlet(/mnt/overlay/wcm/core/content/sites/versionhistory/jcr:content)} Using servlet com.day.cq.wcm.core.impl.servlets.VersionPreviewServlet
   1901 TIMER_END{14,ServletResolution} URI=/mnt/overlay/wcm/core/content/sites/versionhistory/_jcr_content.txt handled by Servlet=com.day.cq.wcm.core.impl.servlets.VersionPreviewServlet

The servlet is bound to resource type - cq/gui/components/common/admin/versionhistory 

If you have to invoke it via code then you need to make a POST call to following resource - /libs/wcm/core/content/sites/versionhistory/jcr:content 

Pass versionid in request body. 

The servlet will return you the temp path in AEM in response to preview the version. 

 

Avatar

Level 7
Thanks for response ..what would be urlstring to connect or pass in suppose httpclient if I use ---->/libs/wcm/core/content/sites/versionhostory/jcr:content or localhost:4502//libs/wcm/core/content/sites/versionhostory/jcr:content full?

Avatar

Employee Advisor
Send POST request to http://localhost:4502/mnt/overlay/wcm/core/content/sites/versionhistory/_jcr_content.txt and versionid should be passed in the request body/payload. Example - versionId=d81d968b-16ca-4261-be9d-d64d5a2b4883&wcmmode=disabled

Avatar

Level 7
I tried that httpPost(" http://localhost:4502/mnt/overlay/wcm/core/content/sites/versionhistory/_jcr_content.txt") and request.setEntity(versionidand wcmmodedisabled)..but not able to connect it gives 404 eror not found . I m doing it through java