create page programmatically by servlet | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

As mentioned by Peter, please use PageManager APIs.

Example:- 

Link:- https://helpx.adobe.com/experience-manager/using/ecommerce62.html

// Creating custom Adobe Experience Manager 6.2 ecommerce providers

Option 2: Using Curl Commands

Link:- https://hashimkhan.in/2015/05/27/aem-with-curl/

//

Create a Page (Although its not recommended to do with cURL, as we have Page Manager API for this.)


curl -u admin:admin -F "jcr:primaryType=cq:Page" -F "jcr:content/jcr:primaryType=cq:PageContent" -F "jcr:content/jcr:title=Curl Page" -F "jcr:content/sling:resourceType=geometrixx/components/contentpage" http://localhost:4502/content/geometrixx/en/curlPage
 

I hope this would help you.

~kautuk

2 replies

kautuk_sahni
kautuk_sahniAccepted solution
Employee
December 16, 2016

As mentioned by Peter, please use PageManager APIs.

Example:- 

Link:- https://helpx.adobe.com/experience-manager/using/ecommerce62.html

// Creating custom Adobe Experience Manager 6.2 ecommerce providers

Option 2: Using Curl Commands

Link:- https://hashimkhan.in/2015/05/27/aem-with-curl/

//

Create a Page (Although its not recommended to do with cURL, as we have Page Manager API for this.)


curl -u admin:admin -F "jcr:primaryType=cq:Page" -F "jcr:content/jcr:primaryType=cq:PageContent" -F "jcr:content/jcr:title=Curl Page" -F "jcr:content/sling:resourceType=geometrixx/components/contentpage" http://localhost:4502/content/geometrixx/en/curlPage
 

I hope this would help you.

~kautuk

Kautuk Sahni
Peter_Puzanovs
New Participant
December 15, 2016

Hi,

You can try and use the PageManager[1] API from your Servlet.

Please note that instance of PageManager[1] is instantiated via the PageManagerfactory[2]

[1] https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/day/cq/wcm/api/PageManager.html

[2] https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/day/cq/wcm/api/PageManagerFactory.html

Regards,

Peter