コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Sling servlet by path and resourceType

Avatar

Level 6

Hi,

 

There are 2 ways we can register our servlet by using path and resoureType.

AEM suggests always try to use resourceType registering servlet.

 

Can any one explain which Scenario is not achieved through resourceType then we we need to go to Path.

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hi @manikanthar1295 

 

As you have mentioned, there are 2 ways to register a servlet (path and resource type). There are many advantages by binding a servlet to a resource type rather than a path discussed here: https://aem.redquark.org/2019/07/sling-servlet-04-registration-via.html

 

Main advantage is Acess control. If you do not want any access control over the servlet you can use PATH based approach.

 

Other use-cases can be the negation of the advantages that resource type can provide.

 

Thanks,

Kiran Vedantam.

元の投稿で解決策を見る

2 返信

Avatar

正解者
Community Advisor

Hi @manikanthar1295 

 

As you have mentioned, there are 2 ways to register a servlet (path and resource type). There are many advantages by binding a servlet to a resource type rather than a path discussed here: https://aem.redquark.org/2019/07/sling-servlet-04-registration-via.html

 

Main advantage is Acess control. If you do not want any access control over the servlet you can use PATH based approach.

 

Other use-cases can be the negation of the advantages that resource type can provide.

 

Thanks,

Kiran Vedantam.

Avatar

Community Advisor

Please registered all the servlet by resourceType.

This will allow you to easly manage path permissions thorugh dispatcher and easy to manage all the availble path

and if you are on AMS and AEMaaCS, one of the code quaility rule is not to registered sling servelt by path

https://experienceleague.adobe.com/docs/experience-manager-cloud-manager/using/how-to-use/custom-cod...

 

Arun Patidar

AEM LinksLinkedIn