Expand my Community achievements bar.

SOLVED

How to get child page properties(image,title,description) using servlet in base path.

Avatar

Level 3

i have java servlet where it can collect only child pages title , but i want which collects all the child pages properties not only title , I want description and image inside of  child pages  like page listing component.

It is similiar like below picture 

Screenshot (67).png

 

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi Krishna,

 

Just want to share my thoughts, are you using slingmodes exporter components on child pages?

 

If yes - just write generalized servlet resource Type and the call the all the models as well as it will  give complete JSON object.

 

Thanks,

Nani.

View solution in original post

4 Replies

Avatar

Community Advisor

@Krishna0427,

I suggest you looking at the implementation of the servlet, and then extend it to expose more than just the title of each child page. There might be a POJO model Java class that you may need to extend, to output more properties as you mentioned. 

Avatar

Level 3

yes , how can i get child page information like title, text, image and show that component as all articles component. 

Can u share any references , i will go through it . 

Avatar

Correct answer by
Level 3

Hi Krishna,

 

Just want to share my thoughts, are you using slingmodes exporter components on child pages?

 

If yes - just write generalized servlet resource Type and the call the all the models as well as it will  give complete JSON object.

 

Thanks,

Nani.