Calling Servlet from apps node | Community
Skip to main content
Level 3
May 15, 2017
Solved

Calling Servlet from apps node

  • May 15, 2017
  • 2 replies
  • 858 views

Hi, 

Is it possible to call a slingservlet from any node in crx.

Please find the attached screenshot explaining the requirement.

Thanks

Akshita

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 cquser1

Hi,

From what I am aware of, it is better to use resourceTypes to invoke servlets , than from a specific path. There are multiple articles out there , explaining the same.

@SlingServlet(resourceTypes = { "sample/components/page/homepage" }, methods = { "GET" })

2 replies

cquser1
cquser1Accepted solution
Level 7
May 15, 2017

Hi,

From what I am aware of, it is better to use resourceTypes to invoke servlets , than from a specific path. There are multiple articles out there , explaining the same.

@SlingServlet(resourceTypes = { "sample/components/page/homepage" }, methods = { "GET" })

joerghoh
Adobe Employee
Adobe Employee
May 15, 2017

Hi,

can you please elaborate, how you want to call the servlet? Do you want to create a dialog, which calls the servlet?

Jörg