내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

sling.servlet.resourceTypes

Avatar

Level 3

Hello All,

Very Good Evening!!!

When to use sling.servlet.resourceTypes of servlet annotation?

Could you please share me if you have any application like ajax call with servlet(sling.servlet.resourceTypes)?

 

Thanks in advance.

 

Thanks,
Venkatesham G.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

Under the Sling docs - both ways for registering a Sling Servlet are valid:

[img]SlingReg.png[/img]

https://sling.apache.org/documentation/the-sling-engine/servlets.html

Registering a servlet by path is a supported way and lets you invoke it using AJAX calls - even from outside of AEM. 

However - binding by resource type is valid too. 

We have a community article that shows how to bind by resource type: 

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

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
Level 10

Under the Sling docs - both ways for registering a Sling Servlet are valid:

[img]SlingReg.png[/img]

https://sling.apache.org/documentation/the-sling-engine/servlets.html

Registering a servlet by path is a supported way and lets you invoke it using AJAX calls - even from outside of AEM. 

However - binding by resource type is valid too. 

We have a community article that shows how to bind by resource type: 

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

Avatar

Employee Advisor

It is always a good practice to use resourceType for invoking servlets rather than creating custom servlet URLs. Check out this article - https://cqdump.wordpress.com/2015/03/23/aem-coding-best-practice-servlets/