この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
I copied a sling servlet which had the path of /bing/demo/querybuilder
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
Hi @TB3dock
There is an OSGi Configuration named Apache Sling Servlet/Script Resolver and Error Handler in the felix console.
It has a property called "Execution Paths(servletresolver.paths)" which holds a list of absolute paths under which the servlet is accessible as a Resource.
By default bin is allowed in the resolver path which is why it works.
If you want your servlet with /api path to be accessible you will need to allow the path in the resolver paths. Please see the screenshot below:
It is recommended to use resource type based servlet over path based now. Please refer the link below:
https://sling.apache.org/documentation/the-sling-engine/servlets.html
Hope this helps!
Thanks!
Hi @TB3dock
There is an OSGi Configuration named Apache Sling Servlet/Script Resolver and Error Handler in the felix console.
It has a property called "Execution Paths(servletresolver.paths)" which holds a list of absolute paths under which the servlet is accessible as a Resource.
By default bin is allowed in the resolver path which is why it works.
If you want your servlet with /api path to be accessible you will need to allow the path in the resolver paths. Please see the screenshot below:
It is recommended to use resource type based servlet over path based now. Please refer the link below:
https://sling.apache.org/documentation/the-sling-engine/servlets.html
Hope this helps!
Thanks!
表示
返信
いいね!の合計
表示
返信
いいね!の合計
hello, it is mainly for security and processing of request correctly, as i noticed. but apart from /bin you can also implement your servlet using resource type and selector like below
@SlingServlet(resourceTypes = "site/components/mypage",
selectors = "myselector",
extensions = "html",
methods = "GET",
metatype =true)
Thanks!!